using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;

namespace LdCms.EF.DbModels
{
    public partial class LdCmsDbContext : DbContext
    {
        public LdCmsDbContext()
        {
        }

        public LdCmsDbContext(DbContextOptions<LdCmsDbContext> options)
            : base(options)
        {
        }

        public virtual DbSet<Ld_Alipay_Menu> Ld_Alipay_Menu { get; set; }
        public virtual DbSet<Ld_Alipay_Platform> Ld_Alipay_Platform { get; set; }
        public virtual DbSet<Ld_Alipay_PlatformAisino> Ld_Alipay_PlatformAisino { get; set; }
        public virtual DbSet<Ld_Alipay_PlatformNotify> Ld_Alipay_PlatformNotify { get; set; }
        public virtual DbSet<Ld_Alipay_PlatformPublic> Ld_Alipay_PlatformPublic { get; set; }
        public virtual DbSet<Ld_Alipay_PublicTemplateMessage> Ld_Alipay_PublicTemplateMessage { get; set; }
        public virtual DbSet<Ld_Alipay_PublicTemplateMessageSendRecord> Ld_Alipay_PublicTemplateMessageSendRecord { get; set; }
        public virtual DbSet<Ld_Alipay_TradeOrder> Ld_Alipay_TradeOrder { get; set; }
        public virtual DbSet<Ld_Alipay_TradeOrderExtendParams> Ld_Alipay_TradeOrderExtendParams { get; set; }
        public virtual DbSet<Ld_Alipay_TradeOrderGoodsDetail> Ld_Alipay_TradeOrderGoodsDetail { get; set; }
        public virtual DbSet<Ld_Alipay_TradeOrderInvoiceInfo> Ld_Alipay_TradeOrderInvoiceInfo { get; set; }
        public virtual DbSet<Ld_Alipay_TradeOrderNotify> Ld_Alipay_TradeOrderNotify { get; set; }
        public virtual DbSet<Ld_Alipay_TradeOrderReceiverAddressInfo> Ld_Alipay_TradeOrderReceiverAddressInfo { get; set; }
        public virtual DbSet<Ld_Alipay_TradeOrderResponse> Ld_Alipay_TradeOrderResponse { get; set; }
        public virtual DbSet<Ld_Alipay_TradeRefund> Ld_Alipay_TradeRefund { get; set; }
        public virtual DbSet<Ld_Alipay_TradeRefundGoodsDetail> Ld_Alipay_TradeRefundGoodsDetail { get; set; }
        public virtual DbSet<Ld_Alipay_TradeRefundResponse> Ld_Alipay_TradeRefundResponse { get; set; }
        public virtual DbSet<Ld_Alipay_TradeRefundRoyaltyParameters> Ld_Alipay_TradeRefundRoyaltyParameters { get; set; }
        public virtual DbSet<Ld_Alipay_User> Ld_Alipay_User { get; set; }
        public virtual DbSet<Ld_Alipay_UserCode> Ld_Alipay_UserCode { get; set; }
        public virtual DbSet<Ld_Alipay_UserMember> Ld_Alipay_UserMember { get; set; }
        public virtual DbSet<Ld_Basics_Area> Ld_Basics_Area { get; set; }
        public virtual DbSet<Ld_Basics_City> Ld_Basics_City { get; set; }
        public virtual DbSet<Ld_Basics_Media> Ld_Basics_Media { get; set; }
        public virtual DbSet<Ld_Basics_MediaInterface> Ld_Basics_MediaInterface { get; set; }
        public virtual DbSet<Ld_Basics_MediaMember> Ld_Basics_MediaMember { get; set; }
        public virtual DbSet<Ld_Basics_MediaStaff> Ld_Basics_MediaStaff { get; set; }
        public virtual DbSet<Ld_Basics_Province> Ld_Basics_Province { get; set; }
        public virtual DbSet<Ld_Community_Column> Ld_Community_Column { get; set; }
        public virtual DbSet<Ld_Community_ColumnPermission> Ld_Community_ColumnPermission { get; set; }
        public virtual DbSet<Ld_Community_Config> Ld_Community_Config { get; set; }
        public virtual DbSet<Ld_Community_Subscribe> Ld_Community_Subscribe { get; set; }
        public virtual DbSet<Ld_Community_Theme> Ld_Community_Theme { get; set; }
        public virtual DbSet<Ld_Community_ThemeCollect> Ld_Community_ThemeCollect { get; set; }
        public virtual DbSet<Ld_Community_ThemeContent> Ld_Community_ThemeContent { get; set; }
        public virtual DbSet<Ld_Community_ThemeReply> Ld_Community_ThemeReply { get; set; }
        public virtual DbSet<Ld_Extend_Advertisement> Ld_Extend_Advertisement { get; set; }
        public virtual DbSet<Ld_Extend_AdvertisementDetails> Ld_Extend_AdvertisementDetails { get; set; }
        public virtual DbSet<Ld_Extend_Link> Ld_Extend_Link { get; set; }
        public virtual DbSet<Ld_Extend_LinkGroup> Ld_Extend_LinkGroup { get; set; }
        public virtual DbSet<Ld_Extend_SearchKeyword> Ld_Extend_SearchKeyword { get; set; }
        public virtual DbSet<Ld_Goods_Brand> Ld_Goods_Brand { get; set; }
        public virtual DbSet<Ld_Goods_BrandMedia> Ld_Goods_BrandMedia { get; set; }
        public virtual DbSet<Ld_Goods_Category> Ld_Goods_Category { get; set; }
        public virtual DbSet<Ld_Goods_Class> Ld_Goods_Class { get; set; }
        public virtual DbSet<Ld_Goods_Product> Ld_Goods_Product { get; set; }
        public virtual DbSet<Ld_Goods_ProductAttributes> Ld_Goods_ProductAttributes { get; set; }
        public virtual DbSet<Ld_Goods_ProductMedia> Ld_Goods_ProductMedia { get; set; }
        public virtual DbSet<Ld_Goods_ProductPriceRecord> Ld_Goods_ProductPriceRecord { get; set; }
        public virtual DbSet<Ld_Goods_ProductSKU> Ld_Goods_ProductSKU { get; set; }
        public virtual DbSet<Ld_Goods_ProductSKURecord> Ld_Goods_ProductSKURecord { get; set; }
        public virtual DbSet<Ld_Goods_ProductShelvesRecord> Ld_Goods_ProductShelvesRecord { get; set; }
        public virtual DbSet<Ld_Goods_ProductSpecificationDetails> Ld_Goods_ProductSpecificationDetails { get; set; }
        public virtual DbSet<Ld_Goods_ProductSpecifications> Ld_Goods_ProductSpecifications { get; set; }
        public virtual DbSet<Ld_Goods_Specifications> Ld_Goods_Specifications { get; set; }
        public virtual DbSet<Ld_Info_Artice> Ld_Info_Artice { get; set; }
        public virtual DbSet<Ld_Info_Block> Ld_Info_Block { get; set; }
        public virtual DbSet<Ld_Info_Class> Ld_Info_Class { get; set; }
        public virtual DbSet<Ld_Info_Notice> Ld_Info_Notice { get; set; }
        public virtual DbSet<Ld_Info_NoticeCategory> Ld_Info_NoticeCategory { get; set; }
        public virtual DbSet<Ld_Info_Page> Ld_Info_Page { get; set; }
        public virtual DbSet<Ld_Institution_Company> Ld_Institution_Company { get; set; }
        public virtual DbSet<Ld_Institution_Dealer> Ld_Institution_Dealer { get; set; }
        public virtual DbSet<Ld_Institution_Department> Ld_Institution_Department { get; set; }
        public virtual DbSet<Ld_Institution_Position> Ld_Institution_Position { get; set; }
        public virtual DbSet<Ld_Institution_Staff> Ld_Institution_Staff { get; set; }
        public virtual DbSet<Ld_Institution_StaffAccessToken> Ld_Institution_StaffAccessToken { get; set; }
        public virtual DbSet<Ld_Institution_StaffRefreshToken> Ld_Institution_StaffRefreshToken { get; set; }
        public virtual DbSet<Ld_Institution_Store> Ld_Institution_Store { get; set; }
        public virtual DbSet<Ld_Institution_Supplier> Ld_Institution_Supplier { get; set; }
        public virtual DbSet<Ld_Institution_Warehouse> Ld_Institution_Warehouse { get; set; }
        public virtual DbSet<Ld_Invoice_AisinoElectronicInvoice> Ld_Invoice_AisinoElectronicInvoice { get; set; }
        public virtual DbSet<Ld_Invoice_AisinoPlatform> Ld_Invoice_AisinoPlatform { get; set; }
        public virtual DbSet<Ld_Log_ErrorRecord> Ld_Log_ErrorRecord { get; set; }
        public virtual DbSet<Ld_Log_LoginRecord> Ld_Log_LoginRecord { get; set; }
        public virtual DbSet<Ld_Log_Table> Ld_Log_Table { get; set; }
        public virtual DbSet<Ld_Log_TableDetails> Ld_Log_TableDetails { get; set; }
        public virtual DbSet<Ld_Log_TableOperation> Ld_Log_TableOperation { get; set; }
        public virtual DbSet<Ld_Log_VisitorRecord> Ld_Log_VisitorRecord { get; set; }
        public virtual DbSet<Ld_Log_WebApiAccessRecord> Ld_Log_WebApiAccessRecord { get; set; }
        public virtual DbSet<Ld_Map_AmapPlatform> Ld_Map_AmapPlatform { get; set; }
        public virtual DbSet<Ld_Map_TencentPlatform> Ld_Map_TencentPlatform { get; set; }
        public virtual DbSet<Ld_Member_Account> Ld_Member_Account { get; set; }
        public virtual DbSet<Ld_Member_AccountAccessToken> Ld_Member_AccountAccessToken { get; set; }
        public virtual DbSet<Ld_Member_AccountRefreshToken> Ld_Member_AccountRefreshToken { get; set; }
        public virtual DbSet<Ld_Member_Address> Ld_Member_Address { get; set; }
        public virtual DbSet<Ld_Member_AmountRecord> Ld_Member_AmountRecord { get; set; }
        public virtual DbSet<Ld_Member_Classify> Ld_Member_Classify { get; set; }
        public virtual DbSet<Ld_Member_Invoice> Ld_Member_Invoice { get; set; }
        public virtual DbSet<Ld_Member_LoginLogs> Ld_Member_LoginLogs { get; set; }
        public virtual DbSet<Ld_Member_PointRecord> Ld_Member_PointRecord { get; set; }
        public virtual DbSet<Ld_Member_Rank> Ld_Member_Rank { get; set; }
        public virtual DbSet<Ld_Member_Settings> Ld_Member_Settings { get; set; }
        public virtual DbSet<Ld_Payment_AlipayPlatform> Ld_Payment_AlipayPlatform { get; set; }
        public virtual DbSet<Ld_Payment_WeixinOrder> Ld_Payment_WeixinOrder { get; set; }
        public virtual DbSet<Ld_Payment_WeixinOrderCouponResult> Ld_Payment_WeixinOrderCouponResult { get; set; }
        public virtual DbSet<Ld_Payment_WeixinOrderDetail> Ld_Payment_WeixinOrderDetail { get; set; }
        public virtual DbSet<Ld_Payment_WeixinOrderDetailGoods> Ld_Payment_WeixinOrderDetailGoods { get; set; }
        public virtual DbSet<Ld_Payment_WeixinOrderRefund> Ld_Payment_WeixinOrderRefund { get; set; }
        public virtual DbSet<Ld_Payment_WeixinOrderRefundCouponResult> Ld_Payment_WeixinOrderRefundCouponResult { get; set; }
        public virtual DbSet<Ld_Payment_WeixinOrderRefundResult> Ld_Payment_WeixinOrderRefundResult { get; set; }
        public virtual DbSet<Ld_Payment_WeixinOrderResult> Ld_Payment_WeixinOrderResult { get; set; }
        public virtual DbSet<Ld_Payment_WeixinOrderSceneInfo> Ld_Payment_WeixinOrderSceneInfo { get; set; }
        public virtual DbSet<Ld_Payment_WeixinPlatform> Ld_Payment_WeixinPlatform { get; set; }
        public virtual DbSet<Ld_Sell_BusRideRecord> Ld_Sell_BusRideRecord { get; set; }
        public virtual DbSet<Ld_Sell_Order> Ld_Sell_Order { get; set; }
        public virtual DbSet<Ld_Sell_OrderInvoice> Ld_Sell_OrderInvoice { get; set; }
        public virtual DbSet<Ld_Sell_OrderInvoiceDetails> Ld_Sell_OrderInvoiceDetails { get; set; }
        public virtual DbSet<Ld_Sell_TransactionRecord> Ld_Sell_TransactionRecord { get; set; }
        public virtual DbSet<Ld_Service_Comment> Ld_Service_Comment { get; set; }
        public virtual DbSet<Ld_Service_CommentAppend> Ld_Service_CommentAppend { get; set; }
        public virtual DbSet<Ld_Service_MessageBoard> Ld_Service_MessageBoard { get; set; }
        public virtual DbSet<Ld_Sms_FanWePlatform> Ld_Sms_FanWePlatform { get; set; }
        public virtual DbSet<Ld_Sms_FanWeSendRecord> Ld_Sms_FanWeSendRecord { get; set; }
        public virtual DbSet<Ld_Sms_TencentPlatform> Ld_Sms_TencentPlatform { get; set; }
        public virtual DbSet<Ld_Sms_TencentSendRecord> Ld_Sms_TencentSendRecord { get; set; }
        public virtual DbSet<Ld_Sys_AccessCorsHost> Ld_Sys_AccessCorsHost { get; set; }
        public virtual DbSet<Ld_Sys_Code> Ld_Sys_Code { get; set; }
        public virtual DbSet<Ld_Sys_Config> Ld_Sys_Config { get; set; }
        public virtual DbSet<Ld_Sys_Function> Ld_Sys_Function { get; set; }
        public virtual DbSet<Ld_Sys_InterfaceAccessToken> Ld_Sys_InterfaceAccessToken { get; set; }
        public virtual DbSet<Ld_Sys_InterfaceAccessWhiteList> Ld_Sys_InterfaceAccessWhiteList { get; set; }
        public virtual DbSet<Ld_Sys_InterfaceAccount> Ld_Sys_InterfaceAccount { get; set; }
        public virtual DbSet<Ld_Sys_Operator> Ld_Sys_Operator { get; set; }
        public virtual DbSet<Ld_Sys_OperatorRole> Ld_Sys_OperatorRole { get; set; }
        public virtual DbSet<Ld_Sys_Role> Ld_Sys_Role { get; set; }
        public virtual DbSet<Ld_Sys_RoleFunction> Ld_Sys_RoleFunction { get; set; }
        public virtual DbSet<Ld_Sys_Version> Ld_Sys_Version { get; set; }
        public virtual DbSet<Ld_Unionpay_AggregatePayPlatform> Ld_Unionpay_AggregatePayPlatform { get; set; }
        public virtual DbSet<Ld_Unionpay_AggregatePayPlatformNotify> Ld_Unionpay_AggregatePayPlatformNotify { get; set; }
        public virtual DbSet<Ld_Unionpay_AggregatePayTradeOrder> Ld_Unionpay_AggregatePayTradeOrder { get; set; }
        public virtual DbSet<Ld_Unionpay_AggregatePayTradeOrderGoodsDetail> Ld_Unionpay_AggregatePayTradeOrderGoodsDetail { get; set; }
        public virtual DbSet<Ld_Unionpay_AggregatePayTradeOrderNotify> Ld_Unionpay_AggregatePayTradeOrderNotify { get; set; }
        public virtual DbSet<Ld_Unionpay_AggregatePayTradeOrderRefund> Ld_Unionpay_AggregatePayTradeOrderRefund { get; set; }
        public virtual DbSet<Ld_Unionpay_AggregatePayTradeOrderRefundResponse> Ld_Unionpay_AggregatePayTradeOrderRefundResponse { get; set; }
        public virtual DbSet<Ld_Unionpay_AggregatePayTradeOrderResponse> Ld_Unionpay_AggregatePayTradeOrderResponse { get; set; }
        public virtual DbSet<Ld_WeChat_Menu> Ld_WeChat_Menu { get; set; }
        public virtual DbSet<Ld_WeChat_PayPlatform> Ld_WeChat_PayPlatform { get; set; }
        public virtual DbSet<Ld_WeChat_Platform> Ld_WeChat_Platform { get; set; }
        public virtual DbSet<Ld_WeChat_PlatformAccesstoken> Ld_WeChat_PlatformAccesstoken { get; set; }
        public virtual DbSet<Ld_WeChat_PlatformNotify> Ld_WeChat_PlatformNotify { get; set; }
        public virtual DbSet<Ld_WeChat_PlatformPayMerchant> Ld_WeChat_PlatformPayMerchant { get; set; }
        public virtual DbSet<Ld_WeChat_QRCode> Ld_WeChat_QRCode { get; set; }
        public virtual DbSet<Ld_WeChat_QRCodeScene> Ld_WeChat_QRCodeScene { get; set; }
        public virtual DbSet<Ld_WeChat_TradeOrder> Ld_WeChat_TradeOrder { get; set; }
        public virtual DbSet<Ld_WeChat_TradeOrderDetail> Ld_WeChat_TradeOrderDetail { get; set; }
        public virtual DbSet<Ld_WeChat_TradeOrderDetailGoods> Ld_WeChat_TradeOrderDetailGoods { get; set; }
        public virtual DbSet<Ld_WeChat_TradeOrderNotify> Ld_WeChat_TradeOrderNotify { get; set; }
        public virtual DbSet<Ld_WeChat_TradeOrderResponse> Ld_WeChat_TradeOrderResponse { get; set; }
        public virtual DbSet<Ld_WeChat_TradeOrderResponseCoupon> Ld_WeChat_TradeOrderResponseCoupon { get; set; }
        public virtual DbSet<Ld_WeChat_TradeOrderSceneInfo> Ld_WeChat_TradeOrderSceneInfo { get; set; }
        public virtual DbSet<Ld_WeChat_TradeRefund> Ld_WeChat_TradeRefund { get; set; }
        public virtual DbSet<Ld_WeChat_TradeRefundNotify> Ld_WeChat_TradeRefundNotify { get; set; }
        public virtual DbSet<Ld_WeChat_TradeRefundResponse> Ld_WeChat_TradeRefundResponse { get; set; }
        public virtual DbSet<Ld_WeChat_TradeRefundResponseCoupon> Ld_WeChat_TradeRefundResponseCoupon { get; set; }
        public virtual DbSet<Ld_WeChat_User> Ld_WeChat_User { get; set; }
        public virtual DbSet<Ld_WeChat_UserBlacklist> Ld_WeChat_UserBlacklist { get; set; }
        public virtual DbSet<Ld_WeChat_UserCode> Ld_WeChat_UserCode { get; set; }
        public virtual DbSet<Ld_WeChat_UserMember> Ld_WeChat_UserMember { get; set; }
        public virtual DbSet<Ld_WeChat_UserTags> Ld_WeChat_UserTags { get; set; }
        public virtual DbSet<Ld_WeChat_UserTagsMember> Ld_WeChat_UserTagsMember { get; set; }
        public virtual DbSet<V_Alipay_Platform> V_Alipay_Platform { get; set; }
        public virtual DbSet<V_Alipay_PlatformAisino> V_Alipay_PlatformAisino { get; set; }
        public virtual DbSet<V_Alipay_PlatformNotify> V_Alipay_PlatformNotify { get; set; }
        public virtual DbSet<V_Alipay_PlatformPublic> V_Alipay_PlatformPublic { get; set; }
        public virtual DbSet<V_Alipay_TradeOrder> V_Alipay_TradeOrder { get; set; }
        public virtual DbSet<V_Alipay_TradeOrderNotify> V_Alipay_TradeOrderNotify { get; set; }
        public virtual DbSet<V_Alipay_TradeOrderResponse> V_Alipay_TradeOrderResponse { get; set; }
        public virtual DbSet<V_Alipay_UserCodeMember> V_Alipay_UserCodeMember { get; set; }
        public virtual DbSet<V_Basics_Media> V_Basics_Media { get; set; }
        public virtual DbSet<V_Community_Subscribe> V_Community_Subscribe { get; set; }
        public virtual DbSet<V_Community_Theme> V_Community_Theme { get; set; }
        public virtual DbSet<V_Community_ThemeCollect> V_Community_ThemeCollect { get; set; }
        public virtual DbSet<V_Community_ThemeReply> V_Community_ThemeReply { get; set; }
        public virtual DbSet<V_Institution_CompanyVersion> V_Institution_CompanyVersion { get; set; }
        public virtual DbSet<V_Institution_Staff> V_Institution_Staff { get; set; }
        public virtual DbSet<V_Rand> V_Rand { get; set; }
        public virtual DbSet<V_Sell_TransactionRecord> V_Sell_TransactionRecord { get; set; }
        public virtual DbSet<V_Sys_Operator> V_Sys_Operator { get; set; }
        public virtual DbSet<V_Sys_OperatorPermission> V_Sys_OperatorPermission { get; set; }
        public virtual DbSet<V_Sys_RoleFunction> V_Sys_RoleFunction { get; set; }
        public virtual DbSet<V_WeChat_Platform> V_WeChat_Platform { get; set; }
        public virtual DbSet<V_WeChat_PlatformNotify> V_WeChat_PlatformNotify { get; set; }
        public virtual DbSet<V_WeChat_PlatformPayMerchant> V_WeChat_PlatformPayMerchant { get; set; }
        public virtual DbSet<V_WeChat_User> V_WeChat_User { get; set; }
        public virtual DbSet<V_WeChat_UserBlacklist> V_WeChat_UserBlacklist { get; set; }
        public virtual DbSet<V_WeChat_UserCodeMember> V_WeChat_UserCodeMember { get; set; }
        public virtual DbSet<V_WeChat_UserTags> V_WeChat_UserTags { get; set; }

        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            if (!optionsBuilder.IsConfigured)
            {
                optionsBuilder.UseSqlServer("Server=127.0.0.1;User Id=sa;Password=123456;Database=LdCms_Db_V2");
            }
        }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.Entity<Ld_Alipay_Menu>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.MenuID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.MenuID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.ActionParam)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.ActionType)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Icon)
                    .HasMaxLength(1024)
                    .IsUnicode(false);

                entity.Property(e => e.MenuKey)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Name).HasMaxLength(64);

                entity.Property(e => e.ParentID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Type)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Alipay_Platform>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AESKey)
                    .HasMaxLength(1024)
                    .IsUnicode(false);

                entity.Property(e => e.AlipayPublicKey)
                    .HasMaxLength(2048)
                    .IsUnicode(false);

                entity.Property(e => e.AppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AppName).HasMaxLength(100);

                entity.Property(e => e.AppTypeName).HasMaxLength(32);

                entity.Property(e => e.CertPath)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.Charset)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Format)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.Logo)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.MerchantPrivateKey)
                    .HasMaxLength(2048)
                    .IsUnicode(false);

                entity.Property(e => e.MerchantPublicKey)
                    .HasMaxLength(2048)
                    .IsUnicode(false);

                entity.Property(e => e.PID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformName).HasMaxLength(100);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.SignType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.TypeName).HasMaxLength(100);

                entity.Property(e => e.Url)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.Version)
                    .HasMaxLength(20)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Alipay_PlatformAisino>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.AppPlatformID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AppPlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AisinoPlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Remark).HasMaxLength(400);
            });

            modelBuilder.Entity<Ld_Alipay_PlatformNotify>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.NotifyID });

                entity.Property(e => e.NotifyID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Alipay_PlatformPublic>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.AppPlatformID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.AppPlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.PublicPlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Remark).HasMaxLength(400);
            });

            modelBuilder.Entity<Ld_Alipay_PublicTemplateMessage>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.TemplateID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.TemplateID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.TemplateField).HasMaxLength(1000);

                entity.Property(e => e.TemplateName).HasMaxLength(100);

                entity.Property(e => e.TemplateStyle).HasMaxLength(32);
            });

            modelBuilder.Entity<Ld_Alipay_PublicTemplateMessageSendRecord>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.SendID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SendID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AppName).HasMaxLength(100);

                entity.Property(e => e.Code)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Msg).HasMaxLength(1000);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.TemplateID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.TemplateName).HasMaxLength(100);

                entity.Property(e => e.ToUserID)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Alipay_TradeOrder>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OrderID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AppAuthToken)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.AppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AuthCode)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Body).HasMaxLength(128);

                entity.Property(e => e.BusinessParams).HasMaxLength(2048);

                entity.Property(e => e.BuyerID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Charset)
                    .HasMaxLength(10)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.DiscountableAmount).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.Format)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.Method)
                    .HasMaxLength(128)
                    .IsUnicode(false);

                entity.Property(e => e.NotifyUrl)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.OperatorID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OutTradeNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.PassbackParams).HasMaxLength(512);

                entity.Property(e => e.ProductCode)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.QuitUrl)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.ReturnUrl)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.Scene)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SellerID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Sign)
                    .HasMaxLength(344)
                    .IsUnicode(false);

                entity.Property(e => e.SignType)
                    .HasMaxLength(10)
                    .IsUnicode(false);

                entity.Property(e => e.StoreID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Subject).HasMaxLength(256);

                entity.Property(e => e.TerminalID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.TerminalParams).HasMaxLength(2048);

                entity.Property(e => e.Timestamp)
                    .HasMaxLength(19)
                    .IsUnicode(false);

                entity.Property(e => e.TotalAmount).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.TradeStatus)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.Version)
                    .HasMaxLength(3)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Alipay_TradeOrderExtendParams>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OrderID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CardType)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.IndustryRefluxInfo).HasMaxLength(512);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.SysServiceProviderID)
                    .HasMaxLength(64)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Alipay_TradeOrderGoodsDetail>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OrderID, e.GoodsID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.GoodsID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Body).HasMaxLength(1000);

                entity.Property(e => e.CategoriesTree)
                    .HasMaxLength(128)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.GoodsCategory)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.GoodsName).HasMaxLength(256);

                entity.Property(e => e.Price).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.ShowUrl).HasMaxLength(400);
            });

            modelBuilder.Entity<Ld_Alipay_TradeOrderInvoiceInfo>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OrderID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Details).HasMaxLength(512);

                entity.Property(e => e.InvoiceMerchantName).HasMaxLength(100);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.TaxNum)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Alipay_TradeOrderNotify>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OrderID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AuthAppID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.BuyerID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.BuyerLogonID)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.BuyerPayAmount).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.Charset)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.FundBillList).HasMaxLength(512);

                entity.Property(e => e.GmtCreate).HasColumnType("datetime");

                entity.Property(e => e.GmtPayment).HasColumnType("datetime");

                entity.Property(e => e.InvoiceAmount).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.NotifyID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.NotifyTime).HasColumnType("datetime");

                entity.Property(e => e.NotifyType)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.OutTradeNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.PointAmount).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.ReceiptAmount)
                    .HasMaxLength(11)
                    .IsUnicode(false);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.SellerEmail)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.SellerID)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.Sign)
                    .HasMaxLength(344)
                    .IsUnicode(false);

                entity.Property(e => e.SignType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.Subject).HasMaxLength(512);

                entity.Property(e => e.TotalAmount).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.TradeNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.TradeStatus)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.Version)
                    .HasMaxLength(16)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Alipay_TradeOrderReceiverAddressInfo>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OrderID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Address).HasMaxLength(512);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.DivisionCode)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.Mobile)
                    .HasMaxLength(60)
                    .IsUnicode(false);

                entity.Property(e => e.Name).HasMaxLength(512);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.Zip)
                    .HasMaxLength(40)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Alipay_TradeOrderResponse>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OrderID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AuthAppID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.BuyerID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.BuyerLogonID)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.BuyerPayAmount).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.Charset)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.FundBillList).HasMaxLength(512);

                entity.Property(e => e.GmtCreate).HasColumnType("datetime");

                entity.Property(e => e.GmtPayment).HasColumnType("datetime");

                entity.Property(e => e.InvoiceAmount).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.NotifyID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.NotifyTime).HasColumnType("datetime");

                entity.Property(e => e.NotifyType)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.OutTradeNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.PointAmount).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.ReceiptAmount)
                    .HasMaxLength(11)
                    .IsUnicode(false);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.SellerEmail)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.SellerID)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.Sign)
                    .HasMaxLength(344)
                    .IsUnicode(false);

                entity.Property(e => e.SignType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.Subject).HasMaxLength(512);

                entity.Property(e => e.TotalAmount).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.TradeNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.TradeStatus)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.Version)
                    .HasMaxLength(16)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Alipay_TradeRefund>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OrderID, e.RefundID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.RefundID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.AppAuthToken)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.AppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Charset)
                    .HasMaxLength(10)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Format)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.Method)
                    .HasMaxLength(128)
                    .IsUnicode(false);

                entity.Property(e => e.OperatorID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrgPid)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.OutRequestNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.OutTradeNo)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.RefundAmount).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.RefundCurrency)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.RefundReason).HasMaxLength(256);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.Sign)
                    .HasMaxLength(344)
                    .IsUnicode(false);

                entity.Property(e => e.SignType)
                    .HasMaxLength(10)
                    .IsUnicode(false);

                entity.Property(e => e.StoreID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.TerminalID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Timestamp)
                    .HasMaxLength(19)
                    .IsUnicode(false);

                entity.Property(e => e.TradeNo)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Version)
                    .HasMaxLength(3)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Alipay_TradeRefundGoodsDetail>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OrderID, e.RefundID, e.GoodsID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.RefundID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.GoodsID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AlipayGoodsID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Body).HasMaxLength(1000);

                entity.Property(e => e.CategoriesTree)
                    .HasMaxLength(128)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.GoodsCategory)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.GoodsName).HasMaxLength(256);

                entity.Property(e => e.Price).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.ShowUrl).HasMaxLength(400);
            });

            modelBuilder.Entity<Ld_Alipay_TradeRefundResponse>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OrderID, e.RefundID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.RefundID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.BuyerLogonID)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.BuyerUserID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Code)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.FundChange)
                    .HasMaxLength(1)
                    .IsUnicode(false);

                entity.Property(e => e.GmtRefundPay).HasColumnType("datetime");

                entity.Property(e => e.Msg)
                    .HasMaxLength(512)
                    .IsUnicode(false);

                entity.Property(e => e.OutTradeNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.PresentRefundBuyerAmount)
                    .HasMaxLength(11)
                    .IsUnicode(false);

                entity.Property(e => e.PresentRefundDiscountAmount)
                    .HasMaxLength(11)
                    .IsUnicode(false);

                entity.Property(e => e.PresentRefundMdiscountAmount)
                    .HasMaxLength(11)
                    .IsUnicode(false);

                entity.Property(e => e.RefundCurrency)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.RefundDetailItemList).HasMaxLength(200);

                entity.Property(e => e.RefundFee).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.RefundPresetPaytoolList).HasMaxLength(200);

                entity.Property(e => e.RefundSettlementID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.SendBackFee).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.Sign)
                    .HasMaxLength(512)
                    .IsUnicode(false);

                entity.Property(e => e.StoreName).HasMaxLength(512);

                entity.Property(e => e.SubCode)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.SubMsg).HasMaxLength(512);

                entity.Property(e => e.TradeNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Alipay_TradeRefundRoyaltyParameters>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OrderID, e.RefundID, e.RoyaltyID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.RefundID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.RoyaltyID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Amount).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Desc).HasMaxLength(1000);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.RoyaltyType)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.TransIn)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.TransInType)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.TransOut)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.TransOutType)
                    .HasMaxLength(64)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Alipay_User>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.UserID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.UserID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Avatar)
                    .HasMaxLength(512)
                    .IsUnicode(false);

                entity.Property(e => e.City).HasMaxLength(32);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Gender)
                    .HasMaxLength(2)
                    .IsUnicode(false);

                entity.Property(e => e.NickName).HasMaxLength(64);

                entity.Property(e => e.Province).HasMaxLength(32);

                entity.Property(e => e.SubscribeScene)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.UserStatus)
                    .HasMaxLength(2)
                    .IsUnicode(false);

                entity.Property(e => e.UserType)
                    .HasMaxLength(2)
                    .IsUnicode(false);

                entity.Property(e => e.isCertified)
                    .HasMaxLength(2)
                    .IsUnicode(false);

                entity.Property(e => e.isStudentCertified)
                    .HasMaxLength(2)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Alipay_UserCode>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.Code });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Code)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.IpAddress)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.State)
                    .HasMaxLength(128)
                    .IsUnicode(false);

                entity.Property(e => e.UserID)
                    .HasMaxLength(30)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Alipay_UserMember>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.UserID, e.MemberID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.UserID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.MemberID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.IpAddress)
                    .HasMaxLength(20)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Basics_Area>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.AreaID });

                entity.Property(e => e.Name).HasMaxLength(36);
            });

            modelBuilder.Entity<Ld_Basics_City>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CityID });

                entity.Property(e => e.Name).HasMaxLength(36);
            });

            modelBuilder.Entity<Ld_Basics_Media>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.MediaID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.MediaID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.FileExtension)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.FileName).HasMaxLength(250);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.Src).HasMaxLength(250);

                entity.Property(e => e.Title).HasMaxLength(400);

                entity.Property(e => e.Type)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.Url).HasMaxLength(250);
            });

            modelBuilder.Entity<Ld_Basics_MediaInterface>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.MediaID, e.AppID })
                    .HasName("PK_Ld_Basics_InterfaceMedia");

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.MediaID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.AppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Basics_MediaMember>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.MemberID, e.MediaID })
                    .HasName("PK_Ld_Basics_MemberMedia");

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.MemberID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.MediaID)
                    .HasMaxLength(20)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Basics_MediaStaff>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.MediaID, e.StaffID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.MediaID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.StaffID)
                    .HasMaxLength(20)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Basics_Province>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.ProvinceID });

                entity.Property(e => e.Name).HasMaxLength(36);
            });

            modelBuilder.Entity<Ld_Community_Column>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.ColumnID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ColumnID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ColumnName).HasMaxLength(20);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Description).HasMaxLength(400);

                entity.Property(e => e.ImgSrc)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.Keyword).HasMaxLength(200);

                entity.Property(e => e.Title).HasMaxLength(100);
            });

            modelBuilder.Entity<Ld_Community_ColumnPermission>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.ColumnID, e.PermissionID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ColumnID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PermissionID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.RankID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.RankName).HasMaxLength(20);

                entity.Property(e => e.TypeName).HasMaxLength(20);
            });

            modelBuilder.Entity<Ld_Community_Config>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Description).HasMaxLength(400);

                entity.Property(e => e.Keyword).HasMaxLength(200);

                entity.Property(e => e.Name).HasMaxLength(200);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.Title).HasMaxLength(100);
            });

            modelBuilder.Entity<Ld_Community_Subscribe>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.MemberID, e.SubscribeUserID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.MemberID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.SubscribeUserID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.IpAddress)
                    .HasMaxLength(20)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Community_Theme>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.ThemeID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ThemeID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ColumnID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ColumnName).HasMaxLength(20);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.ImgArray)
                    .HasMaxLength(2000)
                    .IsUnicode(false);

                entity.Property(e => e.ImgSrc)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.IpAddress)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.MemberID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.NickName).HasMaxLength(20);

                entity.Property(e => e.Title).HasMaxLength(100);
            });

            modelBuilder.Entity<Ld_Community_ThemeCollect>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.ThemeID, e.MemberID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ThemeID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.MemberID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.IpAddress)
                    .HasMaxLength(20)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Community_ThemeContent>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.ThemeID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ThemeID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Content).HasColumnType("ntext");

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Description).HasMaxLength(400);

                entity.Property(e => e.Keyword).HasMaxLength(200);
            });

            modelBuilder.Entity<Ld_Community_ThemeReply>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.ThemeID, e.ReplyID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ThemeID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ReplyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.ImgArray)
                    .HasMaxLength(2000)
                    .IsUnicode(false);

                entity.Property(e => e.ImgSrc)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.IpAddress)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.MemberID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.NickName).HasMaxLength(20);

                entity.Property(e => e.ParentReplyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ReplyContent).HasMaxLength(4000);
            });

            modelBuilder.Entity<Ld_Extend_Advertisement>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.AdvertisementID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.AdvertisementID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Name).HasMaxLength(50);

                entity.Property(e => e.Remark).HasMaxLength(400);
            });

            modelBuilder.Entity<Ld_Extend_AdvertisementDetails>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.DetailsID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.DetailsID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.AdvertisementID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.MediaID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.MediaPath)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.MediaType)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.Title).HasMaxLength(100);

                entity.Property(e => e.Url)
                    .HasMaxLength(250)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Extend_Link>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.LinkID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.LinkID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.GroupID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.GroupName).HasMaxLength(20);

                entity.Property(e => e.Logo)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.Name).HasMaxLength(50);

                entity.Property(e => e.TypeName).HasMaxLength(20);

                entity.Property(e => e.Url).HasMaxLength(250);
            });

            modelBuilder.Entity<Ld_Extend_LinkGroup>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.GroupID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.GroupID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Name).HasMaxLength(50);

                entity.Property(e => e.Remark).HasMaxLength(400);
            });

            modelBuilder.Entity<Ld_Extend_SearchKeyword>(entity =>
            {
                entity.HasIndex(e => new { e.IsTop, e.ID })
                    .HasName("IDX_SearchKeyword_OrderBy");

                entity.HasIndex(e => new { e.SystemID, e.CompanyID })
                    .HasName("IDX_SearchKeyword_Content");

                entity.HasIndex(e => new { e.SystemID, e.CompanyID, e.Keyword, e.CreateDate })
                    .HasName("IDX_SearchKeyword_Search");

                entity.Property(e => e.ClientName).HasMaxLength(20);

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.IpAddress)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Keyword).HasMaxLength(50);

                entity.Property(e => e.MemberID)
                    .HasMaxLength(20)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Goods_Brand>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.BrandID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.BrandID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.BrandName).HasMaxLength(128);

                entity.Property(e => e.CategoryID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CategoryName).HasMaxLength(128);

                entity.Property(e => e.Content).HasColumnType("ntext");

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Description).HasMaxLength(400);

                entity.Property(e => e.FirstLetter)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.ImgSrc)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.Keywords).HasMaxLength(400);
            });

            modelBuilder.Entity<Ld_Goods_BrandMedia>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.BrandID, e.MediaID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.BrandID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.MediaID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Description).HasMaxLength(400);

                entity.Property(e => e.Keywords).HasMaxLength(200);

                entity.Property(e => e.OriginalPath)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.ThumbnailPath)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.Title).HasMaxLength(256);
            });

            modelBuilder.Entity<Ld_Goods_Category>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.CategoryID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CategoryID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CategoryName).HasMaxLength(64);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Description).HasMaxLength(400);

                entity.Property(e => e.FirstLetter)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.ImgSrc)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.Keyword).HasMaxLength(200);

                entity.Property(e => e.OrderPath)
                    .HasMaxLength(640)
                    .IsUnicode(false);

                entity.Property(e => e.ParentID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.ParentPath)
                    .HasMaxLength(640)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Goods_Class>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.ClassID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ClassID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.ClassName).HasMaxLength(64);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Description).HasMaxLength(400);

                entity.Property(e => e.ImgSrc)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.Keyword).HasMaxLength(200);

                entity.Property(e => e.OrderPath)
                    .HasMaxLength(640)
                    .IsUnicode(false);

                entity.Property(e => e.ParentID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.ParentPath)
                    .HasMaxLength(640)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Goods_Product>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.ProductID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ProductID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.BarCode)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.BrandID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.BrandName).HasMaxLength(64);

                entity.Property(e => e.CategoryID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CategoryName).HasMaxLength(64);

                entity.Property(e => e.ClassID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.ClassName)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.Content).HasColumnType("ntext");

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Description).HasMaxLength(400);

                entity.Property(e => e.ImgSrc).HasMaxLength(256);

                entity.Property(e => e.Keywords).HasMaxLength(250);

                entity.Property(e => e.ListingTime).HasColumnType("date");

                entity.Property(e => e.MarketPrice).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.Packing).HasColumnType("ntext");

                entity.Property(e => e.Parameter).HasColumnType("ntext");

                entity.Property(e => e.PriceSchemeID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.ProductModelNumber).HasMaxLength(64);

                entity.Property(e => e.ProductName).HasMaxLength(128);

                entity.Property(e => e.QRCode)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.ShelvesTime).HasColumnType("datetime");

                entity.Property(e => e.SupplierID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Title).HasMaxLength(256);

                entity.Property(e => e.TitleBrief).HasMaxLength(256);

                entity.Property(e => e.VideoSrc).HasMaxLength(256);
            });

            modelBuilder.Entity<Ld_Goods_ProductAttributes>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.ProductID, e.AttributesID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ProductID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AttributesID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AttributesName).HasMaxLength(256);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Remark).HasMaxLength(400);
            });

            modelBuilder.Entity<Ld_Goods_ProductMedia>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.ProductID, e.MediaID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ProductID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.MediaID)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.MediaPath).HasMaxLength(256);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.SpecificationID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Title).HasMaxLength(128);

                entity.Property(e => e.TypeName).HasMaxLength(50);
            });

            modelBuilder.Entity<Ld_Goods_ProductPriceRecord>(entity =>
            {
                entity.Property(e => e.CompanyId)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CostPrice).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.Date).HasColumnType("datetime");

                entity.Property(e => e.DealerPrice).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.EndTime).HasColumnType("datetime");

                entity.Property(e => e.FirstSpecificationID).HasMaxLength(50);

                entity.Property(e => e.LastSpecificationID).HasMaxLength(50);

                entity.Property(e => e.MarketPrice).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.OnlinePrice).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.ProductID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.SellPrice).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.SpellOrderPrice).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.StartTime).HasColumnType("datetime");
            });

            modelBuilder.Entity<Ld_Goods_ProductSKU>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.ProductID, e.FirstSpecificationID, e.LastSpecificationID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ProductID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.FirstSpecificationID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.LastSpecificationID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.BarCode)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.CostPrice).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.DealerPrice).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.MarketPrice).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.OnlinePrice).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.Remark)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.SellPrice).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.SpellOrderPrice).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.UnitName).HasMaxLength(32);

                entity.Property(e => e.WarehouseID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.WarehouseName).HasMaxLength(128);
            });

            modelBuilder.Entity<Ld_Goods_ProductSKURecord>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.RecordID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.RecordID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CostPrice).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.FirstSpecificationID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.LastSpecificationID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.ProductID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.SupplierID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.TypeName).HasMaxLength(32);

                entity.Property(e => e.UnitName).HasMaxLength(32);

                entity.Property(e => e.WarehouseID)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Goods_ProductShelvesRecord>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.ProductID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.ProductID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Account)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.NickName).HasMaxLength(32);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.TypeName).HasMaxLength(128);
            });

            modelBuilder.Entity<Ld_Goods_ProductSpecificationDetails>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.ProductID, e.SpecificationID, e.DetailID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ProductID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SpecificationID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.DetailID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.ImgSrc)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.Name).HasMaxLength(64);

                entity.Property(e => e.Remark).HasMaxLength(400);
            });

            modelBuilder.Entity<Ld_Goods_ProductSpecifications>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.ProductID, e.SpecificationID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ProductID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SpecificationID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.ImgSrc)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.SpecificationName).HasMaxLength(128);
            });

            modelBuilder.Entity<Ld_Goods_Specifications>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.SpecificationID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.SpecificationID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.SpecificationName).HasMaxLength(128);
            });

            modelBuilder.Entity<Ld_Info_Artice>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.ArticeID });

                entity.HasIndex(e => e.CreateDate)
                    .HasName("IDX_Artice_CreateDate");

                entity.HasIndex(e => new { e.SystemID, e.CompanyID, e.IsDel, e.CreateDate })
                    .HasName("IDX_Artice_Content");

                entity.HasIndex(e => new { e.SystemID, e.CompanyID, e.ClassID, e.IsDel, e.CreateDate })
                    .HasName("IDX_Artice_Content_ClassId");

                entity.HasIndex(e => new { e.SystemID, e.CompanyID, e.Title, e.ClassID, e.State, e.IsDel, e.Account, e.NickName, e.CreateDate })
                    .HasName("IDX_Artice_Search");

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ArticeID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Account)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Author).HasMaxLength(50);

                entity.Property(e => e.ClassID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ClassName).HasMaxLength(50);

                entity.Property(e => e.CommentEndTime).HasColumnType("datetime");

                entity.Property(e => e.CommentStartTime).HasColumnType("datetime");

                entity.Property(e => e.Content).HasColumnType("ntext");

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Description).HasMaxLength(400);

                entity.Property(e => e.ImgArray)
                    .HasMaxLength(2000)
                    .IsUnicode(false);

                entity.Property(e => e.ImgSrc)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.Keyword).HasMaxLength(200);

                entity.Property(e => e.NickName).HasMaxLength(20);

                entity.Property(e => e.Source).HasMaxLength(50);

                entity.Property(e => e.Tags).HasMaxLength(50);

                entity.Property(e => e.Title).HasMaxLength(200);

                entity.Property(e => e.TitleBrief).HasMaxLength(100);

                entity.Property(e => e.TypeID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.TypeName).HasMaxLength(50);

                entity.Property(e => e.Url)
                    .HasMaxLength(250)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Info_Block>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.BlockID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.BlockID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Content).HasColumnType("ntext");

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.Tags).HasMaxLength(200);

                entity.Property(e => e.Title).HasMaxLength(200);
            });

            modelBuilder.Entity<Ld_Info_Class>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.ClassID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ClassID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ClassName).HasMaxLength(50);

                entity.Property(e => e.ClassTypeName).HasMaxLength(20);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Description).HasMaxLength(400);

                entity.Property(e => e.ImgSrc)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.Keyword).HasMaxLength(200);

                entity.Property(e => e.OrderPath)
                    .HasMaxLength(400)
                    .IsUnicode(false);

                entity.Property(e => e.ParentID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ParentPath)
                    .HasMaxLength(400)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Info_Notice>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.NoticeID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.NoticeID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Author).HasMaxLength(50);

                entity.Property(e => e.ClassID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ClassName).HasMaxLength(50);

                entity.Property(e => e.Content).HasColumnType("ntext");

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Description).HasMaxLength(400);

                entity.Property(e => e.ImgArray)
                    .HasMaxLength(2000)
                    .IsUnicode(false);

                entity.Property(e => e.ImgSrc)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.Keyword).HasMaxLength(200);

                entity.Property(e => e.StaffId)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.StaffName).HasMaxLength(20);

                entity.Property(e => e.Title).HasMaxLength(200);
            });

            modelBuilder.Entity<Ld_Info_NoticeCategory>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.CategoryID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CategoryID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CategoryName).HasMaxLength(20);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Remark).HasMaxLength(400);
            });

            modelBuilder.Entity<Ld_Info_Page>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PageID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PageID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ClassID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ClassName).HasMaxLength(20);

                entity.Property(e => e.Content).HasColumnType("ntext");

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Description).HasMaxLength(400);

                entity.Property(e => e.ImgArray)
                    .HasMaxLength(2000)
                    .IsUnicode(false);

                entity.Property(e => e.ImgSrc)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.Keyword).HasMaxLength(200);

                entity.Property(e => e.Title).HasMaxLength(200);
            });

            modelBuilder.Entity<Ld_Institution_Company>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Address).HasMaxLength(250);

                entity.Property(e => e.CompanyName).HasMaxLength(50);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.DealerID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Description).HasMaxLength(200);

                entity.Property(e => e.Email).HasMaxLength(100);

                entity.Property(e => e.EndTime).HasColumnType("datetime");

                entity.Property(e => e.Fax)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.LogoImages).HasMaxLength(255);

                entity.Property(e => e.NickName).HasMaxLength(20);

                entity.Property(e => e.Password)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Phone).HasMaxLength(20);

                entity.Property(e => e.RegisterIpAddress)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.RegisterTime).HasColumnType("datetime");

                entity.Property(e => e.StartTime).HasColumnType("datetime");

                entity.Property(e => e.Tel)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.UserName).HasMaxLength(20);

                entity.Property(e => e.Version)
                    .HasMaxLength(10)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Institution_Dealer>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.DealerID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.DealerID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Address).HasMaxLength(250);

                entity.Property(e => e.ClassID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ClassName).HasMaxLength(20);

                entity.Property(e => e.CompanyName).HasMaxLength(100);

                entity.Property(e => e.Contacts).HasMaxLength(20);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.DealerName).HasMaxLength(50);

                entity.Property(e => e.Description).HasMaxLength(400);

                entity.Property(e => e.Email)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.EndTime).HasColumnType("datetime");

                entity.Property(e => e.Fax)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Logo)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.Password).HasMaxLength(32);

                entity.Property(e => e.Phone)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.QQ)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.RankID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.RankName).HasMaxLength(20);

                entity.Property(e => e.StartTime).HasColumnType("datetime");

                entity.Property(e => e.Tel)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.UserID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.UserName).HasMaxLength(20);

                entity.Property(e => e.Weixin)
                    .HasMaxLength(20)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Institution_Department>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.DepartmentID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.DepartmentID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.DepartmentName).HasMaxLength(20);

                entity.Property(e => e.Description).HasMaxLength(400);

                entity.Property(e => e.NodePath)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.ParentID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.SortPath)
                    .HasMaxLength(400)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Institution_Position>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PositionID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PositionID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Description).HasMaxLength(200);

                entity.Property(e => e.PositionName).HasMaxLength(20);
            });

            modelBuilder.Entity<Ld_Institution_Staff>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.StaffID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.StaffID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Address).HasMaxLength(250);

                entity.Property(e => e.BirthDate).HasColumnType("date");

                entity.Property(e => e.BirthPlace).HasMaxLength(200);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.DepartmentID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.DepartmentName).HasMaxLength(50);

                entity.Property(e => e.Description).HasMaxLength(400);

                entity.Property(e => e.Education).HasMaxLength(50);

                entity.Property(e => e.Email)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.EndWorkDate).HasColumnType("date");

                entity.Property(e => e.ExpirationContractDate).HasColumnType("date");

                entity.Property(e => e.HeadImgUrl).HasMaxLength(200);

                entity.Property(e => e.IDCard)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Name).HasMaxLength(20);

                entity.Property(e => e.NickName).HasMaxLength(20);

                entity.Property(e => e.Password)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Phone)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PositionID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PositionName).HasMaxLength(50);

                entity.Property(e => e.QQ)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.SignContractDate).HasColumnType("date");

                entity.Property(e => e.StaffName).HasMaxLength(10);

                entity.Property(e => e.StartWorkDate).HasColumnType("date");

                entity.Property(e => e.StoreID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.StoreName).HasMaxLength(50);

                entity.Property(e => e.UserName).HasMaxLength(50);

                entity.Property(e => e.Wages).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.WarehouseID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.WarehouseName).HasMaxLength(50);

                entity.Property(e => e.Weixin)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Institution_StaffAccessToken>(entity =>
            {
                entity.HasKey(e => e.AccessToken);

                entity.Property(e => e.AccessToken)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.IpAddress)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.StaffID)
                    .HasMaxLength(20)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Institution_StaffRefreshToken>(entity =>
            {
                entity.HasKey(e => e.RefreshToken);

                entity.Property(e => e.RefreshToken)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.AccessToken)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.IpAddress)
                    .HasMaxLength(20)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Institution_Store>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.StoreID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.StoreID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Address).HasMaxLength(250);

                entity.Property(e => e.Contacts).HasMaxLength(10);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Description).HasMaxLength(400);

                entity.Property(e => e.Email).HasMaxLength(100);

                entity.Property(e => e.EndTime).HasColumnType("datetime");

                entity.Property(e => e.Fax)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Keyword).HasMaxLength(200);

                entity.Property(e => e.Logo)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.Phone)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.StartTime).HasColumnType("datetime");

                entity.Property(e => e.StoreName).HasMaxLength(100);

                entity.Property(e => e.Tel)
                    .HasMaxLength(20)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Institution_Supplier>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.SupplierID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.SupplierID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Address)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.Business).HasMaxLength(400);

                entity.Property(e => e.ClassName).HasMaxLength(20);

                entity.Property(e => e.CodeCertificateImageUrl)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.CodeCertificateNumber).HasMaxLength(50);

                entity.Property(e => e.CompanyName).HasMaxLength(50);

                entity.Property(e => e.CompanyNature).HasMaxLength(50);

                entity.Property(e => e.Contacts)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Description).HasMaxLength(400);

                entity.Property(e => e.Email)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.Fax)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.LicenseImageUrl).HasMaxLength(250);

                entity.Property(e => e.LicenseNumber).HasMaxLength(50);

                entity.Property(e => e.Representative).HasMaxLength(20);

                entity.Property(e => e.Tel)
                    .HasMaxLength(20)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Institution_Warehouse>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.WarehouseID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.WarehouseID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Address).HasMaxLength(250);

                entity.Property(e => e.Contacts).HasMaxLength(10);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Description).HasMaxLength(400);

                entity.Property(e => e.Fax)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Tel)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.WarehouseName).HasMaxLength(100);
            });

            modelBuilder.Entity<Ld_Invoice_AisinoElectronicInvoice>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.OrderID, e.InvoiceID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.InvoiceID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.ErrorCode)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ErrorMsg).HasMaxLength(200);

                entity.Property(e => e.FileName)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.FilePath)
                    .HasMaxLength(400)
                    .IsUnicode(false);

                entity.Property(e => e.FileUrl)
                    .HasMaxLength(400)
                    .IsUnicode(false);

                entity.Property(e => e.InvoiceCode)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.InvoiceNumber)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.InvoicePassword)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.InvoiceQRCode)
                    .HasMaxLength(8000)
                    .IsUnicode(false);

                entity.Property(e => e.InvoiceTitle).HasMaxLength(200);

                entity.Property(e => e.InvoiceVariety)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.OpenTicketDate)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.OpenTicketFlowNumber)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.OpenTicketType)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.OperationCode)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.TaxAmount)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.TotalContainTaxAmount)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.TotalExcludingTaxAmount)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.VerificationCode)
                    .HasMaxLength(20)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Invoice_AisinoPlatform>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID })
                    .HasName("PK_Ld_Aisino_Platform");

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Address).HasMaxLength(400);

                entity.Property(e => e.BankAccount).HasMaxLength(50);

                entity.Property(e => e.BankName).HasMaxLength(100);

                entity.Property(e => e.CollectionClerk).HasMaxLength(10);

                entity.Property(e => e.CompanyName).HasMaxLength(200);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.GoodsClassifyCode)
                    .HasMaxLength(19)
                    .IsUnicode(false);

                entity.Property(e => e.InvoiceClerk).HasMaxLength(10);

                entity.Property(e => e.PlatformName).HasMaxLength(100);

                entity.Property(e => e.ProjectName).HasMaxLength(200);

                entity.Property(e => e.ProjectUnit).HasMaxLength(10);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.Reviewer).HasMaxLength(10);

                entity.Property(e => e.Specification).HasMaxLength(200);

                entity.Property(e => e.TaxClassifyCodeVersion)
                    .HasMaxLength(10)
                    .IsUnicode(false);

                entity.Property(e => e.TaxpayerIdentificationNumber)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Tel)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.TypeName).HasMaxLength(50);

                entity.Property(e => e.Uri)
                    .HasMaxLength(256)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Log_ErrorRecord>(entity =>
            {
                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.IpAddress).HasMaxLength(20);

                entity.Property(e => e.Message).HasMaxLength(4000);

                entity.Property(e => e.Url).HasMaxLength(255);
            });

            modelBuilder.Entity<Ld_Log_LoginRecord>(entity =>
            {
                entity.Property(e => e.Account)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ClientName)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Description).HasMaxLength(200);

                entity.Property(e => e.IpAddress)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.NickName).HasMaxLength(20);

                entity.Property(e => e.TypeName).HasMaxLength(20);
            });

            modelBuilder.Entity<Ld_Log_Table>(entity =>
            {
                entity.HasKey(e => e.TableID);

                entity.Property(e => e.TableID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Account).HasMaxLength(50);

                entity.Property(e => e.BusinessName).HasMaxLength(50);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.NickName).HasMaxLength(50);

                entity.Property(e => e.PrimaryKey)
                    .HasMaxLength(800)
                    .IsUnicode(false);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.TableName).HasMaxLength(50);

                entity.Property(e => e.UrlTemplate).HasMaxLength(400);
            });

            modelBuilder.Entity<Ld_Log_TableDetails>(entity =>
            {
                entity.Property(e => e.Account).HasMaxLength(50);

                entity.Property(e => e.ColumnDataType).HasMaxLength(50);

                entity.Property(e => e.ColumnName).HasMaxLength(50);

                entity.Property(e => e.ColumnText).HasMaxLength(50);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.NickName).HasMaxLength(50);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.TableID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.TableName)
                    .HasMaxLength(50)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Log_TableOperation>(entity =>
            {
                entity.Property(e => e.Account).HasMaxLength(20);

                entity.Property(e => e.ClassName).HasMaxLength(20);

                entity.Property(e => e.ClientName).HasMaxLength(20);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.IpAdress)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.NewContent).HasColumnType("text");

                entity.Property(e => e.NickName).HasMaxLength(20);

                entity.Property(e => e.OldContent).HasColumnType("text");

                entity.Property(e => e.PrimaryKeyValue).HasMaxLength(200);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.TableID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.TableName)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.Url).HasMaxLength(400);
            });

            modelBuilder.Entity<Ld_Log_VisitorRecord>(entity =>
            {
                entity.Property(e => e.AbsoluteUri).HasMaxLength(250);

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Host).HasMaxLength(50);

                entity.Property(e => e.IpAddress).HasMaxLength(20);

                entity.Property(e => e.QueryString).HasMaxLength(4000);
            });

            modelBuilder.Entity<Ld_Log_WebApiAccessRecord>(entity =>
            {
                entity.HasIndex(e => new { e.SystemID, e.CompanyID, e.ClassID, e.Url, e.State, e.CreateDate })
                    .HasName("IDX_WebApiAccessRecord_Search");

                entity.Property(e => e.Account)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.ActionName)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.ClassName).HasMaxLength(32);

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ControllerName)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.IpAddress)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Method)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.MethodName)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.Params).HasMaxLength(4000);

                entity.Property(e => e.Result).HasColumnType("ntext");

                entity.Property(e => e.TotalMillisecond).HasComputedColumnSql("(datediff(millisecond,[createdate],[updatedate]))");

                entity.Property(e => e.UpdateDate).HasColumnType("datetime");

                entity.Property(e => e.Url)
                    .HasMaxLength(1000)
                    .IsUnicode(false);

                entity.Property(e => e.Version)
                    .HasMaxLength(50)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Map_AmapPlatform>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Key)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.Name).HasMaxLength(100);

                entity.Property(e => e.PrivateKey)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.Remark).HasMaxLength(400);
            });

            modelBuilder.Entity<Ld_Map_TencentPlatform>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID })
                    .HasName("PK_Ld_Map_Tencent");

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Key)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.Name).HasMaxLength(100);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.SK)
                    .HasMaxLength(64)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Member_Account>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.MemberID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.MemberID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.AccountBalance).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.Address).HasMaxLength(128);

                entity.Property(e => e.Area).HasMaxLength(20);

                entity.Property(e => e.City).HasMaxLength(20);

                entity.Property(e => e.ClassName).HasMaxLength(20);

                entity.Property(e => e.CompanyName).HasMaxLength(50);

                entity.Property(e => e.Country).HasMaxLength(20);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Email)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.HeadImageUrl)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.IDCard)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.LastLoginIpAddress)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.LastLoginTime).HasColumnType("datetime");

                entity.Property(e => e.Name).HasMaxLength(10);

                entity.Property(e => e.NickName).HasMaxLength(20);

                entity.Property(e => e.Password)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Phone)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Province).HasMaxLength(20);

                entity.Property(e => e.QQ)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.RankID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.RankName).HasMaxLength(20);

                entity.Property(e => e.RegisterIpAddress)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.RegisterTime).HasColumnType("datetime");

                entity.Property(e => e.Remark).HasMaxLength(200);

                entity.Property(e => e.Tel)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.TotalAmount).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.TotalConsumption).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.UserName)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Weixin)
                    .HasMaxLength(64)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Member_AccountAccessToken>(entity =>
            {
                entity.HasKey(e => e.Token)
                    .HasName("PK_Ld_Member_AccessToken");

                entity.Property(e => e.Token)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.IpAddress)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.MemberID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Uuid)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Member_AccountRefreshToken>(entity =>
            {
                entity.HasKey(e => e.RefreshToken)
                    .HasName("PK_Ld_Member_RefreshToken");

                entity.Property(e => e.RefreshToken)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.IpAddress)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Token)
                    .HasMaxLength(64)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Member_Address>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.MemberID, e.AddressID })
                    .HasName("PK_Ld_Member_Address_1");

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.MemberID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.AddressID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Address).HasMaxLength(150);

                entity.Property(e => e.Area).HasMaxLength(20);

                entity.Property(e => e.City).HasMaxLength(20);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Name).HasMaxLength(20);

                entity.Property(e => e.Phone)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Province).HasMaxLength(20);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.Tags).HasMaxLength(200);
            });

            modelBuilder.Entity<Ld_Member_AmountRecord>(entity =>
            {
                entity.Property(e => e.Account)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Amount).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.Body).HasColumnType("ntext");

                entity.Property(e => e.ClassName).HasMaxLength(20);

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.MemberID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.NickName).HasMaxLength(20);

                entity.Property(e => e.Remark).HasMaxLength(400);
            });

            modelBuilder.Entity<Ld_Member_Classify>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.ClassID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ClassName).HasMaxLength(100);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Remark).HasMaxLength(400);
            });

            modelBuilder.Entity<Ld_Member_Invoice>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.MemberID, e.InvoiceID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.MemberID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.InvoiceID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Address).HasMaxLength(250);

                entity.Property(e => e.BankAccount)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.BankName).HasMaxLength(50);

                entity.Property(e => e.BusinessLicense).HasMaxLength(400);

                entity.Property(e => e.ClassName).HasMaxLength(20);

                entity.Property(e => e.CompanyName).HasMaxLength(100);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.TaxpayerIdentificationNumber)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.Tel)
                    .HasMaxLength(20)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Member_LoginLogs>(entity =>
            {
                entity.Property(e => e.Account)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Description).HasMaxLength(200);

                entity.Property(e => e.IpAddress)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.MemberID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.NickName).HasMaxLength(20);
            });

            modelBuilder.Entity<Ld_Member_PointRecord>(entity =>
            {
                entity.Property(e => e.Account).HasMaxLength(20);

                entity.Property(e => e.Body).HasMaxLength(1000);

                entity.Property(e => e.ClassName).HasMaxLength(20);

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.MemberID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.NickName).HasMaxLength(20);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.TasksID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.TypeName).HasMaxLength(20);

                entity.Property(e => e.ipAddress)
                    .HasMaxLength(20)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Member_Rank>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.RankID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.RankID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.RankName).HasMaxLength(20);

                entity.Property(e => e.Remark).HasMaxLength(400);
            });

            modelBuilder.Entity<Ld_Member_Settings>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID })
                    .HasName("PK_Ld_Member_Config");

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Account)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.NickName).HasMaxLength(20);

                entity.Property(e => e.Remark).HasMaxLength(400);
            });

            modelBuilder.Entity<Ld_Payment_AlipayPlatform>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AESKey)
                    .HasMaxLength(1024)
                    .IsUnicode(false);

                entity.Property(e => e.AlipayPublicKey)
                    .HasMaxLength(2048)
                    .IsUnicode(false);

                entity.Property(e => e.AppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AppName).HasMaxLength(100);

                entity.Property(e => e.CertPath)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.Charset)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.MerchantPrivateKey)
                    .HasMaxLength(2048)
                    .IsUnicode(false);

                entity.Property(e => e.MerchantPublicKey)
                    .HasMaxLength(2048)
                    .IsUnicode(false);

                entity.Property(e => e.PID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformName).HasMaxLength(100);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.SignType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.TypeName).HasMaxLength(100);

                entity.Property(e => e.Url)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.Version)
                    .HasMaxLength(20)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Payment_WeixinOrder>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OrderID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Attach).HasMaxLength(128);

                entity.Property(e => e.AuthCode)
                    .HasMaxLength(128)
                    .IsUnicode(false);

                entity.Property(e => e.Body).HasMaxLength(128);

                entity.Property(e => e.CodeUrl)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.DeviceInfo).HasMaxLength(32);

                entity.Property(e => e.ErrCode)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.ErrCodeDes).HasMaxLength(128);

                entity.Property(e => e.FeeType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.GoodsTag)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.IsSubscribe)
                    .HasMaxLength(2)
                    .IsUnicode(false);

                entity.Property(e => e.LimitPay)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.MWebUrl)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.MchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.NotifyUrl)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.OpenID)
                    .HasMaxLength(128)
                    .IsUnicode(false);

                entity.Property(e => e.OutTradeNo)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PrepayID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.ProductID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Receipt)
                    .HasMaxLength(8)
                    .IsUnicode(false);

                entity.Property(e => e.ResultCode)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.SpbillCreateIp)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.SubAppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SubIsSubscribe)
                    .HasMaxLength(2)
                    .IsUnicode(false);

                entity.Property(e => e.SubMchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SubOpenID)
                    .HasMaxLength(128)
                    .IsUnicode(false);

                entity.Property(e => e.TimeExpire)
                    .HasMaxLength(14)
                    .IsUnicode(false);

                entity.Property(e => e.TimeStart)
                    .HasMaxLength(14)
                    .IsUnicode(false);

                entity.Property(e => e.TradeState)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.TradeStateDesc).HasMaxLength(256);

                entity.Property(e => e.TradeType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.Xml).HasMaxLength(4000);
            });

            modelBuilder.Entity<Ld_Payment_WeixinOrderCouponResult>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OrderID, e.CouponID })
                    .HasName("PK_Ld_Payment_WeixinPayResultCoupon");

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CouponID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CouponBatchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CouponType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");
            });

            modelBuilder.Entity<Ld_Payment_WeixinOrderDetail>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OrderID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.ReceiptID)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Payment_WeixinOrderDetailGoods>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OrderID, e.GoodsID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.GoodsID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.GoodsName).HasMaxLength(256);

                entity.Property(e => e.WXPayGoodsID)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Payment_WeixinOrderRefund>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OrderID, e.RefundNo });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.RefundNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.AppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Body).HasMaxLength(4000);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.MchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.NonceStr)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.NotifyUrl)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.OutRefundNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.OutTradeNo)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.RefundDesc).HasMaxLength(256);

                entity.Property(e => e.RefundFeeType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.RefundSccount)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Sign)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.SignType)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SubAppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SubMchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.TransactionID)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Payment_WeixinOrderRefundCouponResult>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OrderID, e.RefundNo, e.CouponRefundID })
                    .HasName("PK_Ld_Payment_WeixinRefundResultCoupon");

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.RefundNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.CouponRefundID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CouponBatchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CouponType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");
            });

            modelBuilder.Entity<Ld_Payment_WeixinOrderRefundResult>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OrderID, e.RefundNo })
                    .HasName("PK_Ld_Payment_WeixinRefundResult");

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.RefundNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.AppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Body).HasMaxLength(4000);

                entity.Property(e => e.CashFeeType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.ErrCode)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.ErrCodeDes).HasMaxLength(128);

                entity.Property(e => e.FeeType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.MchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.NonceStr)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OutRefundNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.OutTradeNo)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.RefundAccount)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.RefundID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.RefundRecvAccout).HasMaxLength(64);

                entity.Property(e => e.RefundRequestSource)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.RefundStatus)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.ReqInfo).HasMaxLength(4000);

                entity.Property(e => e.ResultCode)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.Sign)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.SignType)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SubAppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SubMchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SuccessTime).HasColumnType("datetime");

                entity.Property(e => e.TransactionID)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Payment_WeixinOrderResult>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OrderID })
                    .HasName("PK_Ld_Payment_WeixinPayResult");

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Attach).HasMaxLength(128);

                entity.Property(e => e.BankType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.Body).HasMaxLength(4000);

                entity.Property(e => e.CashFeeType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.DeviceInfo)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.ErrCode)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.ErrCodeDes).HasMaxLength(128);

                entity.Property(e => e.FeeType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.IsSubscribe)
                    .HasMaxLength(2)
                    .IsUnicode(false);

                entity.Property(e => e.MchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.NonceStr)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OpenID)
                    .HasMaxLength(128)
                    .IsUnicode(false);

                entity.Property(e => e.OutTradeNo)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PromotionDetail).HasMaxLength(4000);

                entity.Property(e => e.ResultCode)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.Sign)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.SignType)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SubAppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SubIsSubscribe)
                    .HasMaxLength(2)
                    .IsUnicode(false);

                entity.Property(e => e.SubMchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SubOpenID)
                    .HasMaxLength(128)
                    .IsUnicode(false);

                entity.Property(e => e.TimeEnd)
                    .HasMaxLength(14)
                    .IsUnicode(false);

                entity.Property(e => e.TradeType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.TransactionID)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Payment_WeixinOrderSceneInfo>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OrderID })
                    .HasName("PK_Ld_Payment_WeixinOrderSceneInfo_1");

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Address).HasMaxLength(128);

                entity.Property(e => e.AreaCode)
                    .HasMaxLength(6)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Name).HasMaxLength(64);

                entity.Property(e => e.SceneID)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Payment_WeixinPlatform>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AppName).HasMaxLength(100);

                entity.Property(e => e.CertPath)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Key)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.MchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformName).HasMaxLength(100);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.SubAppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SubMchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.TypeName).HasMaxLength(100);
            });

            modelBuilder.Entity<Ld_Sell_BusRideRecord>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.RideID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.RideID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.LineName).HasMaxLength(100);

                entity.Property(e => e.LineNumber).HasMaxLength(32);

                entity.Property(e => e.MemberID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OpenID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.ParentPhone)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Phone)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PlateNumber).HasMaxLength(16);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.TypeName).HasMaxLength(32);

                entity.Property(e => e.UpdateTime).HasColumnType("datetime");

                entity.Property(e => e.UpperBusLocationLatitude).HasColumnType("decimal(18, 6)");

                entity.Property(e => e.UpperBusLocationLongitude).HasColumnType("decimal(18, 6)");

                entity.Property(e => e.UpperBusLocationName).HasMaxLength(128);

                entity.Property(e => e.UpperBusTime).HasColumnType("datetime");
            });

            modelBuilder.Entity<Ld_Sell_Order>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.OrderID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AcceptanceStaffID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.AcceptanceStaffName).HasMaxLength(20);

                entity.Property(e => e.Address).HasMaxLength(256);

                entity.Property(e => e.ClassName).HasMaxLength(20);

                entity.Property(e => e.CommentTime).HasColumnType("datetime");

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.DealerID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.InvoiceTime).HasColumnType("datetime");

                entity.Property(e => e.MemberID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Name).HasMaxLength(20);

                entity.Property(e => e.PayChannel)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PayChannelPlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PayTime).HasColumnType("datetime");

                entity.Property(e => e.Phone)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.RefundTime).HasColumnType("datetime");

                entity.Property(e => e.StoreID)
                    .HasMaxLength(20)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Sell_OrderInvoice>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.InvoiceID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.InvoiceID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.AcceptanceTime).HasColumnType("datetime");

                entity.Property(e => e.Address).HasMaxLength(250);

                entity.Property(e => e.BankAccount).HasMaxLength(50);

                entity.Property(e => e.BankName).HasMaxLength(50);

                entity.Property(e => e.Contacts).HasMaxLength(20);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Email)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.InvoiceAddress).HasMaxLength(50);

                entity.Property(e => e.InvoiceCategoryName).HasMaxLength(20);

                entity.Property(e => e.InvoiceTitle).HasMaxLength(200);

                entity.Property(e => e.InvoiceTotalAmount).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.MemberID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.OpenInvoiceTime).HasColumnType("datetime");

                entity.Property(e => e.Phone)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.TaxpayerIdentificationNumber)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.Tel).HasMaxLength(50);

                entity.Property(e => e.TypeName).HasMaxLength(20);
            });

            modelBuilder.Entity<Ld_Sell_OrderInvoiceDetails>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.InvoiceID, e.OrderID })
                    .HasName("PK_Ld_Sell_OrderInvoiceDetails_1");

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.InvoiceID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.OrderTime).HasColumnType("datetime");
            });

            modelBuilder.Entity<Ld_Sell_TransactionRecord>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.TransactionID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.TransactionID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.Amount).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.ChannelID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.DeviceID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.OperatorID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Remark).HasMaxLength(40);

                entity.Property(e => e.StoreID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.TradeTime).HasColumnType("datetime");
            });

            modelBuilder.Entity<Ld_Service_Comment>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.CommentID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CommentID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Description).HasMaxLength(800);

                entity.Property(e => e.Images)
                    .HasMaxLength(2000)
                    .IsUnicode(false);

                entity.Property(e => e.MemberID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Service_CommentAppend>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.CommentID, e.AppendID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CommentID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.AppendID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Description).HasMaxLength(1000);

                entity.Property(e => e.Images)
                    .HasMaxLength(2000)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Service_MessageBoard>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.MessageID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.MessageID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Address).HasMaxLength(250);

                entity.Property(e => e.CompanyName).HasMaxLength(50);

                entity.Property(e => e.Content).HasMaxLength(400);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Email)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.ImgSrc)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.IpAddress)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.MemberID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Name).HasMaxLength(50);

                entity.Property(e => e.NickName).HasMaxLength(20);

                entity.Property(e => e.Phone)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Reply).HasMaxLength(400);

                entity.Property(e => e.ReplyStaffId)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ReplyStaffName).HasMaxLength(10);

                entity.Property(e => e.ReplyTime).HasColumnType("datetime");

                entity.Property(e => e.Tel)
                    .HasMaxLength(50)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Sms_FanWePlatform>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID })
                    .HasName("PK_Ld_Sms_FanWePlatform_1");

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Account).HasMaxLength(64);

                entity.Property(e => e.CallApiUrl)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.Content).HasMaxLength(1000);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Password)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.SmsUrl)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.StatusApiUrl)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.Title).HasMaxLength(100);

                entity.Property(e => e.UserID)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Sms_FanWeSendRecord>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.SendID })
                    .HasName("PK_Ld_FanWe_SendSmsLog");

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SendID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Code)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.Content).HasMaxLength(4000);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Message).HasMaxLength(400);

                entity.Property(e => e.Mobile)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.RemainPoint)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.ReturnStatus)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.SuccessCounts)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.TaskID)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Sms_TencentPlatform>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AppKey)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.Content).HasMaxLength(2048);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.PlatformName).HasMaxLength(64);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.Sign).HasMaxLength(16);

                entity.Property(e => e.Title).HasMaxLength(64);
            });

            modelBuilder.Entity<Ld_Sms_TencentSendRecord>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.SendID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SendID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Code)
                    .HasMaxLength(8)
                    .IsUnicode(false);

                entity.Property(e => e.Content).HasMaxLength(2048);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Description).HasMaxLength(400);

                entity.Property(e => e.ErrMsg).HasMaxLength(400);

                entity.Property(e => e.Ext).HasMaxLength(1024);

                entity.Property(e => e.Extend).HasMaxLength(1024);

                entity.Property(e => e.Mobile)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.NationCode)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.Params).HasMaxLength(1024);

                entity.Property(e => e.ReportStatus)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SId)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.Sign).HasMaxLength(32);

                entity.Property(e => e.UserReceiveTime).HasColumnType("datetime");
            });

            modelBuilder.Entity<Ld_Sys_AccessCorsHost>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.WebHost })
                    .HasName("PK_Ld_Member_AccessCorsHost");

                entity.Property(e => e.WebHost)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.Account)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.NickName).HasMaxLength(20);

                entity.Property(e => e.Remark).HasMaxLength(400);
            });

            modelBuilder.Entity<Ld_Sys_Code>(entity =>
            {
                entity.HasKey(e => e.SystemID)
                    .HasName("PK_LdCms_Sys_Code");

                entity.Property(e => e.SystemID).ValueGeneratedNever();

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Description).HasMaxLength(200);

                entity.Property(e => e.SystemName).HasMaxLength(50);
            });

            modelBuilder.Entity<Ld_Sys_Config>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID })
                    .HasName("PK_Ld_Sys_Config_1");

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Copyright).HasMaxLength(250);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Description).HasMaxLength(400);

                entity.Property(e => e.EmailAddress).HasMaxLength(100);

                entity.Property(e => e.EmailHost).HasMaxLength(50);

                entity.Property(e => e.EmailName).HasMaxLength(100);

                entity.Property(e => e.EmailPassword).HasMaxLength(32);

                entity.Property(e => e.EmailSendPattern).HasMaxLength(50);

                entity.Property(e => e.HomeUrl)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.IcpNumber).HasMaxLength(50);

                entity.Property(e => e.Keyword).HasMaxLength(200);

                entity.Property(e => e.LoginIpAddressWhiteList).HasMaxLength(1000);

                entity.Property(e => e.Shielding).HasMaxLength(2000);

                entity.Property(e => e.StatisticsCode).HasMaxLength(800);

                entity.Property(e => e.StyleSrc)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.Title).HasMaxLength(250);

                entity.Property(e => e.UploadRoot)
                    .HasMaxLength(50)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Sys_Function>(entity =>
            {
                entity.HasKey(e => e.FunctionID);

                entity.Property(e => e.FunctionID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.FunctionName).HasMaxLength(50);

                entity.Property(e => e.ParentID)
                    .HasMaxLength(20)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Sys_InterfaceAccessToken>(entity =>
            {
                entity.HasKey(e => e.Token);

                entity.Property(e => e.Token)
                    .HasMaxLength(128)
                    .IsUnicode(false);

                entity.Property(e => e.AppID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CompanyID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.IpAddress)
                    .HasMaxLength(20)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Sys_InterfaceAccessWhiteList>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.Account, e.IpAddress, e.ClassID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Account)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.IpAddress)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ClassName)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Remark).HasMaxLength(400);
            });

            modelBuilder.Entity<Ld_Sys_InterfaceAccount>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.Account });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Account)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.AppID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.AppKey)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AppSecret)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Description).HasMaxLength(200);

                entity.Property(e => e.Password)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Uuid)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Sys_Operator>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.StaffID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.StaffID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Remark).HasMaxLength(200);
            });

            modelBuilder.Entity<Ld_Sys_OperatorRole>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.StaffID, e.RoleID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.StaffID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.RoleID)
                    .HasMaxLength(20)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Sys_Role>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.RoleID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.RoleID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Remark).HasMaxLength(200);

                entity.Property(e => e.RoleName).HasMaxLength(50);
            });

            modelBuilder.Entity<Ld_Sys_RoleFunction>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.RoleID, e.FunctionID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.RoleID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.FunctionID)
                    .HasMaxLength(20)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Sys_Version>(entity =>
            {
                entity.HasKey(e => e.VersionID);

                entity.Property(e => e.VersionID)
                    .HasMaxLength(10)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.DealerPrice).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.Description).HasMaxLength(400);

                entity.Property(e => e.MarketPrice).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.VersionName).HasMaxLength(50);
            });

            modelBuilder.Entity<Ld_Unionpay_AggregatePayPlatform>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AppName).HasMaxLength(100);

                entity.Property(e => e.Charset)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Key)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.MchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.MchName).HasMaxLength(100);

                entity.Property(e => e.PlatformName).HasMaxLength(100);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.SignType)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Url)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.Version)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Unionpay_AggregatePayPlatformNotify>(entity =>
            {
                entity.HasKey(e => e.NotifyID);

                entity.Property(e => e.NotifyID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Unionpay_AggregatePayTradeOrder>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.OrderID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.Attach)
                    .HasMaxLength(128)
                    .IsUnicode(false);

                entity.Property(e => e.AuthCode)
                    .HasMaxLength(128)
                    .IsUnicode(false);

                entity.Property(e => e.Body).HasMaxLength(128);

                entity.Property(e => e.BuyerID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.DeviceInfo)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.MchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OperatorID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.Service)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.StoreID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SubAppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.TradeState)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.TradeType)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.UserID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.outTradeNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Unionpay_AggregatePayTradeOrderGoodsDetail>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.OrderID, e.GoodsID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.GoodsID)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Unionpay_AggregatePayTradeOrderNotify>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.OrderID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.AppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Attach).HasMaxLength(128);

                entity.Property(e => e.BuyerLogonID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.BuyerUserID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.DeviceInfo).HasMaxLength(64);

                entity.Property(e => e.MchID)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.OpenID)
                    .HasMaxLength(128)
                    .IsUnicode(false);

                entity.Property(e => e.OutTradeNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.OutTransactionID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.PayInfo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.ResultCode)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.Status)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.SubAppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SubOpenID)
                    .HasMaxLength(128)
                    .IsUnicode(false);

                entity.Property(e => e.TimeEnd)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.TradeType)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.TransactionID)
                    .HasMaxLength(64)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Unionpay_AggregatePayTradeOrderRefund>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.OrderID, e.RefundNo });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.RefundNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.DeviceInfo)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.MchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OperatorID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OutRefundNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.OutTradeNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.RefundChannel)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.Service)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.StoreID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.TransactionID)
                    .HasMaxLength(64)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Unionpay_AggregatePayTradeOrderRefundResponse>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.OrderID, e.RefundNo });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.RefundNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.DeviceInfo).HasMaxLength(32);

                entity.Property(e => e.MchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OutRefundNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.OutTradeNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.OutTransactionID)
                    .IsRequired()
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.RefundChannel)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.RefundID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.ResultCode)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.Status)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.TradeType)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.TransactionID)
                    .HasMaxLength(64)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_Unionpay_AggregatePayTradeOrderResponse>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.OrderID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.AppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Attach)
                    .HasMaxLength(128)
                    .IsUnicode(false);

                entity.Property(e => e.BuyerLogonID).HasMaxLength(64);

                entity.Property(e => e.BuyerUserID).HasMaxLength(32);

                entity.Property(e => e.CodeImgUrl)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.CodeUrl)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.DeviceInfo).HasMaxLength(32);

                entity.Property(e => e.MchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OpenID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OutTradeNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.OutTransactionID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.PayInfo)
                    .HasMaxLength(2000)
                    .IsUnicode(false);

                entity.Property(e => e.PayUrl)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.ResultCode)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.Status)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.SubAppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SubOpenID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.TimeEnd)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.TokenID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.TradeType)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.TransactionID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.Uuid)
                    .HasMaxLength(64)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_WeChat_Menu>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.MenuID })
                    .HasName("PK_Ld_Weixin_Menu");

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.MenuID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AppID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Key)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.Name).HasMaxLength(64);

                entity.Property(e => e.PagePath)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.ParentID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Type)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Url)
                    .HasMaxLength(1024)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_WeChat_PayPlatform>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AppName).HasMaxLength(100);

                entity.Property(e => e.CertPath)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Key)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.MchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformName).HasMaxLength(100);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.SubAppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SubMchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.TypeName).HasMaxLength(100);
            });

            modelBuilder.Entity<Ld_WeChat_Platform>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID })
                    .HasName("PK_Ld_Weixin_Platform");

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AppID).HasMaxLength(32);

                entity.Property(e => e.AppName).HasMaxLength(50);

                entity.Property(e => e.AppSecret).HasMaxLength(64);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.EncodingAESKey).HasMaxLength(128);

                entity.Property(e => e.Logo).HasMaxLength(250);

                entity.Property(e => e.PlatformName).HasMaxLength(50);

                entity.Property(e => e.SubscribeTemplateId).HasMaxLength(64);

                entity.Property(e => e.Token).HasMaxLength(64);

                entity.Property(e => e.TypeName).HasMaxLength(100);
            });

            modelBuilder.Entity<Ld_WeChat_PlatformAccesstoken>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID })
                    .HasName("PK_Ld_Weixin_PlatformAccesstoken_1");

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AccessToken)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");
            });

            modelBuilder.Entity<Ld_WeChat_PlatformNotify>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.NotifyID })
                    .HasName("PK_Ld_Weixin_PlatformNotify");

                entity.Property(e => e.NotifyID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_WeChat_PlatformPayMerchant>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.PayPlatformID })
                    .HasName("PK_Ld_WeChat_PlatformPay");

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PayPlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Remark).HasMaxLength(400);
            });

            modelBuilder.Entity<Ld_WeChat_QRCode>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.QRCodeID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.QRCodeID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.ActionName)
                    .HasMaxLength(128)
                    .IsUnicode(false);

                entity.Property(e => e.Body).HasMaxLength(4000);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Name).HasMaxLength(128);

                entity.Property(e => e.Path)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.QRCode).HasColumnType("ntext");

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.Result).HasColumnType("ntext");

                entity.Property(e => e.Scene)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.Url).HasMaxLength(256);
            });

            modelBuilder.Entity<Ld_WeChat_QRCodeScene>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.SceneID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.SceneID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.SceneName).HasMaxLength(128);

                entity.Property(e => e.SceneParams).HasMaxLength(1024);

                entity.Property(e => e.ScenePath)
                    .HasMaxLength(512)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_WeChat_TradeOrder>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OrderID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Attach).HasMaxLength(128);

                entity.Property(e => e.AuthCode)
                    .HasMaxLength(128)
                    .IsUnicode(false);

                entity.Property(e => e.Body).HasMaxLength(128);

                entity.Property(e => e.CodeUrl)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.DeviceInfo).HasMaxLength(32);

                entity.Property(e => e.ErrCode)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.ErrCodeDes).HasMaxLength(128);

                entity.Property(e => e.FeeType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.GoodsTag)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.IsSubscribe)
                    .HasMaxLength(2)
                    .IsUnicode(false);

                entity.Property(e => e.LimitPay)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.MWebUrl)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.MchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.NotifyUrl)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.OpenID)
                    .HasMaxLength(128)
                    .IsUnicode(false);

                entity.Property(e => e.OutTradeNo)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PrepayID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.ProductID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Receipt)
                    .HasMaxLength(8)
                    .IsUnicode(false);

                entity.Property(e => e.ResultCode)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.SpbillCreateIp)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.SubAppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SubIsSubscribe)
                    .HasMaxLength(2)
                    .IsUnicode(false);

                entity.Property(e => e.SubMchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SubOpenID)
                    .HasMaxLength(128)
                    .IsUnicode(false);

                entity.Property(e => e.TimeExpire)
                    .HasMaxLength(14)
                    .IsUnicode(false);

                entity.Property(e => e.TimeStart)
                    .HasMaxLength(14)
                    .IsUnicode(false);

                entity.Property(e => e.TradeState)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.TradeStateDesc).HasMaxLength(256);

                entity.Property(e => e.TradeType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.Xml).HasMaxLength(4000);
            });

            modelBuilder.Entity<Ld_WeChat_TradeOrderDetail>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OrderID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.ReceiptID)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_WeChat_TradeOrderDetailGoods>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OrderID, e.GoodsID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.GoodsID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.GoodsName).HasMaxLength(256);

                entity.Property(e => e.WXPayGoodsID)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_WeChat_TradeOrderNotify>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OrderID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Attach).HasMaxLength(128);

                entity.Property(e => e.BankType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.Body).HasMaxLength(4000);

                entity.Property(e => e.CashFeeType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.DeviceInfo)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.ErrCode)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.ErrCodeDes).HasMaxLength(128);

                entity.Property(e => e.FeeType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.IsSubscribe)
                    .HasMaxLength(2)
                    .IsUnicode(false);

                entity.Property(e => e.MchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.NonceStr)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OpenID)
                    .HasMaxLength(128)
                    .IsUnicode(false);

                entity.Property(e => e.OutTradeNo)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PromotionDetail).HasMaxLength(4000);

                entity.Property(e => e.ResultCode)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.Sign)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.SignType)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SubAppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SubIsSubscribe)
                    .HasMaxLength(2)
                    .IsUnicode(false);

                entity.Property(e => e.SubMchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SubOpenID)
                    .HasMaxLength(128)
                    .IsUnicode(false);

                entity.Property(e => e.TimeEnd)
                    .HasMaxLength(14)
                    .IsUnicode(false);

                entity.Property(e => e.TradeType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.TransactionID)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_WeChat_TradeOrderResponse>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OrderID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Attach).HasMaxLength(128);

                entity.Property(e => e.BankType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.Body).HasMaxLength(4000);

                entity.Property(e => e.CashFeeType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.DeviceInfo)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.ErrCode)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.ErrCodeDes).HasMaxLength(128);

                entity.Property(e => e.FeeType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.IsSubscribe)
                    .HasMaxLength(2)
                    .IsUnicode(false);

                entity.Property(e => e.MchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.NonceStr)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OpenID)
                    .HasMaxLength(128)
                    .IsUnicode(false);

                entity.Property(e => e.OutTradeNo)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PromotionDetail).HasMaxLength(4000);

                entity.Property(e => e.ResultCode)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.Sign)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.SignType)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SubAppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SubIsSubscribe)
                    .HasMaxLength(2)
                    .IsUnicode(false);

                entity.Property(e => e.SubMchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SubOpenID)
                    .HasMaxLength(128)
                    .IsUnicode(false);

                entity.Property(e => e.TimeEnd)
                    .HasMaxLength(14)
                    .IsUnicode(false);

                entity.Property(e => e.TradeType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.TransactionID)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_WeChat_TradeOrderResponseCoupon>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OrderID, e.CouponID })
                    .HasName("PK_Ld_WeChat_TradeOrderCouponResponse");

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CouponID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CouponBatchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CouponType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");
            });

            modelBuilder.Entity<Ld_WeChat_TradeOrderSceneInfo>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OrderID });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Address).HasMaxLength(128);

                entity.Property(e => e.AreaCode)
                    .HasMaxLength(6)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Name).HasMaxLength(64);

                entity.Property(e => e.SceneID)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_WeChat_TradeRefund>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OrderID, e.RefundNo });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.RefundNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.AppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Body).HasMaxLength(4000);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.MchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.NonceStr)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.NotifyUrl)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.OutRefundNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.OutTradeNo)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.RefundDesc).HasMaxLength(256);

                entity.Property(e => e.RefundFeeType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.RefundSccount)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Sign)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.SignType)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SubAppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SubMchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.TransactionID)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_WeChat_TradeRefundNotify>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OrderID, e.RefundNo });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.RefundNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.AppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Body).HasMaxLength(4000);

                entity.Property(e => e.CashFeeType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.ErrCode)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.ErrCodeDes).HasMaxLength(128);

                entity.Property(e => e.FeeType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.MchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.NonceStr)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OutRefundNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.OutTradeNo)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.RefundAccount)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.RefundID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.RefundRecvAccout).HasMaxLength(64);

                entity.Property(e => e.RefundRequestSource)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.RefundStatus)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.ReqInfo).HasMaxLength(4000);

                entity.Property(e => e.ResultCode)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.Sign)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.SignType)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SubAppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SubMchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SuccessTime).HasColumnType("datetime");

                entity.Property(e => e.TransactionID)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_WeChat_TradeRefundResponse>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OrderID, e.RefundNo });

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.RefundNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.AppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Body).HasMaxLength(4000);

                entity.Property(e => e.CashFeeType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.ErrCode)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.ErrCodeDes).HasMaxLength(128);

                entity.Property(e => e.FeeType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.MchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.NonceStr)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OutRefundNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.OutTradeNo)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.RefundAccount)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.RefundID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.RefundRecvAccout).HasMaxLength(64);

                entity.Property(e => e.RefundRequestSource)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.RefundStatus)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.ReqInfo).HasMaxLength(4000);

                entity.Property(e => e.ResultCode)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.Sign)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.SignType)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SubAppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SubMchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SuccessTime).HasColumnType("datetime");

                entity.Property(e => e.TransactionID)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_WeChat_TradeRefundResponseCoupon>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OrderID, e.RefundNo, e.CouponRefundID })
                    .HasName("PK_Ld_WeChat_TradeRefundCouponResponse");

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.RefundNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.CouponRefundID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CouponBatchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CouponType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");
            });

            modelBuilder.Entity<Ld_WeChat_User>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OpenID })
                    .HasName("PK_Ld_Weixin_User");

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OpenID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.City).HasMaxLength(100);

                entity.Property(e => e.Country).HasMaxLength(100);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.HeadImgUrl)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.Language)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.NickName).HasMaxLength(100);

                entity.Property(e => e.Privilege)
                    .HasMaxLength(2000)
                    .IsUnicode(false);

                entity.Property(e => e.Province).HasMaxLength(100);

                entity.Property(e => e.QRSceneStr).HasMaxLength(1000);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.SubscribeScene)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.TagIDList)
                    .HasMaxLength(1000)
                    .IsUnicode(false);

                entity.Property(e => e.TagNameList).HasMaxLength(2000);

                entity.Property(e => e.UnionID)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_WeChat_UserBlacklist>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OpenID })
                    .HasName("PK_Ld_Weixin_UserBlacklist");

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OpenID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.IpAddress)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Remark).HasMaxLength(400);
            });

            modelBuilder.Entity<Ld_WeChat_UserCode>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.Code })
                    .HasName("PK_Ld_Weixin_UserCode");

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Code)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.IpAddress)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.OpenID)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.State)
                    .HasMaxLength(128)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_WeChat_UserMember>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.OpenID })
                    .HasName("PK_Ld_Weixin_UserMember");

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OpenID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.IpAddress)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.MemberID)
                    .HasMaxLength(20)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Ld_WeChat_UserTags>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.TagID })
                    .HasName("PK_Ld_Weixin_UserTags");

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.IpAddress)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.TagName).HasMaxLength(32);
            });

            modelBuilder.Entity<Ld_WeChat_UserTagsMember>(entity =>
            {
                entity.HasKey(e => new { e.SystemID, e.CompanyID, e.PlatformID, e.TagID, e.OpenID })
                    .HasName("PK_Ld_Weixin_UserTagsOpenID");

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OpenID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");
            });

            modelBuilder.Entity<V_Alipay_Platform>(entity =>
            {
                entity.HasNoKey();

                entity.ToView("V_Alipay_Platform");

                entity.Property(e => e.AESKey)
                    .HasMaxLength(1024)
                    .IsUnicode(false);

                entity.Property(e => e.AlipayPublicKey)
                    .HasMaxLength(2048)
                    .IsUnicode(false);

                entity.Property(e => e.AppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AppName).HasMaxLength(100);

                entity.Property(e => e.AppTypeName).HasMaxLength(32);

                entity.Property(e => e.CertPath)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.Charset)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Format)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.Logo)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.MerchantPrivateKey)
                    .HasMaxLength(2048)
                    .IsUnicode(false);

                entity.Property(e => e.MerchantPublicKey)
                    .HasMaxLength(2048)
                    .IsUnicode(false);

                entity.Property(e => e.NotifyID)
                    .IsRequired()
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformName).HasMaxLength(100);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.SignType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.TypeName).HasMaxLength(100);

                entity.Property(e => e.Url)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.Version)
                    .HasMaxLength(20)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<V_Alipay_PlatformAisino>(entity =>
            {
                entity.HasNoKey();

                entity.ToView("V_Alipay_PlatformAisino");

                entity.Property(e => e.AisinoPlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AppName).HasMaxLength(100);

                entity.Property(e => e.AppPlatformID)
                    .IsRequired()
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CompanyID)
                    .IsRequired()
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CompanyName).HasMaxLength(200);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.TaxpayerIdentificationNumber)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<V_Alipay_PlatformNotify>(entity =>
            {
                entity.HasNoKey();

                entity.ToView("V_Alipay_PlatformNotify");

                entity.Property(e => e.AESKey)
                    .HasMaxLength(1024)
                    .IsUnicode(false);

                entity.Property(e => e.Account)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.AlipayPublicKey)
                    .HasMaxLength(2048)
                    .IsUnicode(false);

                entity.Property(e => e.AppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AppName).HasMaxLength(100);

                entity.Property(e => e.AppTypeName).HasMaxLength(32);

                entity.Property(e => e.CertPath)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.Charset)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Format)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.Logo)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.MerchantPrivateKey)
                    .HasMaxLength(2048)
                    .IsUnicode(false);

                entity.Property(e => e.MerchantPublicKey)
                    .HasMaxLength(2048)
                    .IsUnicode(false);

                entity.Property(e => e.NotifyID)
                    .IsRequired()
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Password)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformName).HasMaxLength(100);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.SignType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.TypeName).HasMaxLength(100);

                entity.Property(e => e.Url)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.Uuid)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Version)
                    .HasMaxLength(20)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<V_Alipay_PlatformPublic>(entity =>
            {
                entity.HasNoKey();

                entity.ToView("V_Alipay_PlatformPublic");

                entity.Property(e => e.AppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AppName).HasMaxLength(100);

                entity.Property(e => e.AppPlatformID)
                    .IsRequired()
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CompanyID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.PublicAppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PublicAppName).HasMaxLength(100);

                entity.Property(e => e.PublicPlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Remark).HasMaxLength(400);
            });

            modelBuilder.Entity<V_Alipay_TradeOrder>(entity =>
            {
                entity.HasNoKey();

                entity.ToView("V_Alipay_TradeOrder");

                entity.Property(e => e.Address).HasMaxLength(512);

                entity.Property(e => e.AppAuthToken)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.AppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AuthCode)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Body).HasMaxLength(128);

                entity.Property(e => e.BusinessParams).HasMaxLength(2048);

                entity.Property(e => e.BuyerID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CardType)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Charset)
                    .HasMaxLength(10)
                    .IsUnicode(false);

                entity.Property(e => e.CompanyID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Details).HasMaxLength(512);

                entity.Property(e => e.DiscountableAmount).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.DivisionCode)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.Format)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.IndustryRefluxInfo).HasMaxLength(512);

                entity.Property(e => e.InvoiceMerchantName).HasMaxLength(100);

                entity.Property(e => e.Method)
                    .HasMaxLength(128)
                    .IsUnicode(false);

                entity.Property(e => e.Mobile)
                    .HasMaxLength(60)
                    .IsUnicode(false);

                entity.Property(e => e.Name).HasMaxLength(512);

                entity.Property(e => e.NotifyUrl)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.OperatorID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .IsRequired()
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OutTradeNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.PassbackParams).HasMaxLength(512);

                entity.Property(e => e.PlatformID)
                    .IsRequired()
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.ProductCode)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.QuitUrl)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.ReturnUrl)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.Scene)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SellerID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Sign)
                    .HasMaxLength(344)
                    .IsUnicode(false);

                entity.Property(e => e.SignType)
                    .HasMaxLength(10)
                    .IsUnicode(false);

                entity.Property(e => e.StoreID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Subject).HasMaxLength(256);

                entity.Property(e => e.SysServiceProviderID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.TaxNum)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.TerminalID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.TerminalParams).HasMaxLength(2048);

                entity.Property(e => e.Timestamp)
                    .HasMaxLength(19)
                    .IsUnicode(false);

                entity.Property(e => e.TotalAmount).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.Version)
                    .HasMaxLength(3)
                    .IsUnicode(false);

                entity.Property(e => e.Zip)
                    .HasMaxLength(40)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<V_Alipay_TradeOrderNotify>(entity =>
            {
                entity.HasNoKey();

                entity.ToView("V_Alipay_TradeOrderNotify");

                entity.Property(e => e.AppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AuthAppID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.BuyerID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.BuyerLogonID)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.BuyerPayAmount).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.Charset)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.CompanyID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.FundBillList).HasMaxLength(512);

                entity.Property(e => e.GmtCreate).HasColumnType("datetime");

                entity.Property(e => e.GmtPayment).HasColumnType("datetime");

                entity.Property(e => e.InvoiceAmount).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.NotifyID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.NotifyTime).HasColumnType("datetime");

                entity.Property(e => e.NotifyType)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .IsRequired()
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OutTradeNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .IsRequired()
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PointAmount).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.ReceiptAmount)
                    .HasMaxLength(11)
                    .IsUnicode(false);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.SellerEmail)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.SellerID)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.Sign)
                    .HasMaxLength(344)
                    .IsUnicode(false);

                entity.Property(e => e.SignType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.Subject).HasMaxLength(512);

                entity.Property(e => e.TotalAmount).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.TradeNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.TradeStatus)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.Version)
                    .HasMaxLength(16)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<V_Alipay_TradeOrderResponse>(entity =>
            {
                entity.HasNoKey();

                entity.ToView("V_Alipay_TradeOrderResponse");

                entity.Property(e => e.AppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AuthAppID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.BuyerID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.BuyerLogonID)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.BuyerPayAmount).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.Charset)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.CompanyID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.FundBillList).HasMaxLength(512);

                entity.Property(e => e.GmtCreate).HasColumnType("datetime");

                entity.Property(e => e.GmtPayment).HasColumnType("datetime");

                entity.Property(e => e.InvoiceAmount).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.NotifyID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.NotifyTime).HasColumnType("datetime");

                entity.Property(e => e.NotifyType)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .IsRequired()
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OutTradeNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .IsRequired()
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PointAmount).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.ReceiptAmount)
                    .HasMaxLength(11)
                    .IsUnicode(false);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.SellerEmail)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.SellerID)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.Sign)
                    .HasMaxLength(344)
                    .IsUnicode(false);

                entity.Property(e => e.SignType)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.Subject).HasMaxLength(512);

                entity.Property(e => e.TotalAmount).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.TradeNo)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.TradeStatus)
                    .HasMaxLength(16)
                    .IsUnicode(false);

                entity.Property(e => e.Version)
                    .HasMaxLength(16)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<V_Alipay_UserCodeMember>(entity =>
            {
                entity.HasNoKey();

                entity.ToView("V_Alipay_UserCodeMember");

                entity.Property(e => e.Code)
                    .IsRequired()
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CompanyID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.IpAddress)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.MemberID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .IsRequired()
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.State)
                    .HasMaxLength(128)
                    .IsUnicode(false);

                entity.Property(e => e.UserID)
                    .HasMaxLength(30)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<V_Basics_Media>(entity =>
            {
                entity.HasNoKey();

                entity.ToView("V_Basics_Media");

                entity.Property(e => e.AppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CompanyID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.FileExtension)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.FileName).HasMaxLength(250);

                entity.Property(e => e.MediaID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.MemberID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.Src).HasMaxLength(250);

                entity.Property(e => e.StaffID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Title).HasMaxLength(400);

                entity.Property(e => e.Type)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.Url).HasMaxLength(250);
            });

            modelBuilder.Entity<V_Community_Subscribe>(entity =>
            {
                entity.HasNoKey();

                entity.ToView("V_Community_Subscribe");

                entity.Property(e => e.CompanyID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.HeadImageUrl)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.IpAddress)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.MemberID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Name).HasMaxLength(10);

                entity.Property(e => e.NickName).HasMaxLength(20);

                entity.Property(e => e.Phone)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.SubscribeEmail)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.SubscribeHeadImageUrl)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.SubscribeName).HasMaxLength(10);

                entity.Property(e => e.SubscribeNickName).HasMaxLength(20);

                entity.Property(e => e.SubscribePhone)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.SubscribeRankID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.SubscribeRankName).HasMaxLength(20);

                entity.Property(e => e.SubscribeRemark).HasMaxLength(200);

                entity.Property(e => e.SubscribeUserID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<V_Community_Theme>(entity =>
            {
                entity.HasNoKey();

                entity.ToView("V_Community_Theme");

                entity.Property(e => e.ColumnID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ColumnName).HasMaxLength(20);

                entity.Property(e => e.CompanyID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Content).HasColumnType("ntext");

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Description).HasMaxLength(400);

                entity.Property(e => e.ImgArray)
                    .HasMaxLength(2000)
                    .IsUnicode(false);

                entity.Property(e => e.ImgSrc)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.Keyword).HasMaxLength(200);

                entity.Property(e => e.MemberID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.NickName).HasMaxLength(20);

                entity.Property(e => e.ThemeID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Title).HasMaxLength(100);
            });

            modelBuilder.Entity<V_Community_ThemeCollect>(entity =>
            {
                entity.HasNoKey();

                entity.ToView("V_Community_ThemeCollect");

                entity.Property(e => e.ColumnID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ColumnName).HasMaxLength(20);

                entity.Property(e => e.CompanyID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Content).HasColumnType("ntext");

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Description).HasMaxLength(400);

                entity.Property(e => e.HeadImageUrl)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.ImgArray)
                    .HasMaxLength(2000)
                    .IsUnicode(false);

                entity.Property(e => e.ImgSrc)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.IpAddress)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Keyword).HasMaxLength(200);

                entity.Property(e => e.MemberID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Name).HasMaxLength(10);

                entity.Property(e => e.NickName).HasMaxLength(20);

                entity.Property(e => e.Phone)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ThemeCreateDate).HasColumnType("datetime");

                entity.Property(e => e.ThemeID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ThemeMemberID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Title).HasMaxLength(100);
            });

            modelBuilder.Entity<V_Community_ThemeReply>(entity =>
            {
                entity.HasNoKey();

                entity.ToView("V_Community_ThemeReply");

                entity.Property(e => e.Author).HasMaxLength(20);

                entity.Property(e => e.ColumnID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ColumnName).HasMaxLength(20);

                entity.Property(e => e.CompanyID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.HeadImageUrl)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.ImgArray)
                    .HasMaxLength(2000)
                    .IsUnicode(false);

                entity.Property(e => e.ImgSrc)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.IpAddress)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.MemberID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Name).HasMaxLength(10);

                entity.Property(e => e.NickName).HasMaxLength(20);

                entity.Property(e => e.ParentReplyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.RankID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.RankName).HasMaxLength(20);

                entity.Property(e => e.ReplyContent).HasMaxLength(4000);

                entity.Property(e => e.ReplyID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ThemeID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Title).HasMaxLength(100);
            });

            modelBuilder.Entity<V_Institution_CompanyVersion>(entity =>
            {
                entity.HasNoKey();

                entity.ToView("V_Institution_CompanyVersion");

                entity.Property(e => e.CompanyID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.DealerPrice).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.Description).HasMaxLength(200);

                entity.Property(e => e.EndTime).HasColumnType("datetime");

                entity.Property(e => e.MarketPrice).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.RegisterIpAddress)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.RegisterTime).HasColumnType("datetime");

                entity.Property(e => e.StartTime).HasColumnType("datetime");

                entity.Property(e => e.VersionID)
                    .IsRequired()
                    .HasMaxLength(10)
                    .IsUnicode(false);

                entity.Property(e => e.VersionName).HasMaxLength(50);
            });

            modelBuilder.Entity<V_Institution_Staff>(entity =>
            {
                entity.HasNoKey();

                entity.ToView("V_Institution_Staff");

                entity.Property(e => e.Address).HasMaxLength(250);

                entity.Property(e => e.CompanyID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CompanyName).HasMaxLength(50);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.NickName).HasMaxLength(20);

                entity.Property(e => e.Password)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Phone)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.StaffID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.StaffName).HasMaxLength(10);

                entity.Property(e => e.UserName).HasMaxLength(50);
            });

            modelBuilder.Entity<V_Rand>(entity =>
            {
                entity.HasNoKey();

                entity.ToView("V_Rand");
            });

            modelBuilder.Entity<V_Sell_TransactionRecord>(entity =>
            {
                entity.HasNoKey();

                entity.ToView("V_Sell_TransactionRecord");

                entity.Property(e => e.Amount).HasColumnType("decimal(18, 2)");

                entity.Property(e => e.ChannelID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CompanyID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.DeviceID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.OperatorID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.OrderID)
                    .HasMaxLength(64)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Remark).HasMaxLength(40);

                entity.Property(e => e.StoreID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.TradeTime).HasColumnType("datetime");

                entity.Property(e => e.TransactionID)
                    .IsRequired()
                    .HasMaxLength(64)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<V_Sys_Operator>(entity =>
            {
                entity.HasNoKey();

                entity.ToView("V_Sys_Operator");

                entity.Property(e => e.Address).HasMaxLength(250);

                entity.Property(e => e.CompanyID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.NickName).HasMaxLength(20);

                entity.Property(e => e.Password)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Phone)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Remark).HasMaxLength(200);

                entity.Property(e => e.RoleID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.RoleName).HasMaxLength(50);

                entity.Property(e => e.StaffID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.StaffName).HasMaxLength(10);

                entity.Property(e => e.UserName).HasMaxLength(50);
            });

            modelBuilder.Entity<V_Sys_OperatorPermission>(entity =>
            {
                entity.HasNoKey();

                entity.ToView("V_Sys_OperatorPermission");

                entity.Property(e => e.CompanyID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.FunctionID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.FunctionName).HasMaxLength(50);

                entity.Property(e => e.NickName).HasMaxLength(20);

                entity.Property(e => e.RoleID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.RoleName).HasMaxLength(50);

                entity.Property(e => e.StaffID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.StaffName).HasMaxLength(10);

                entity.Property(e => e.UserName).HasMaxLength(50);
            });

            modelBuilder.Entity<V_Sys_RoleFunction>(entity =>
            {
                entity.HasNoKey();

                entity.ToView("V_Sys_RoleFunction");

                entity.Property(e => e.CompanyID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.FunctionID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.FunctionName).HasMaxLength(50);

                entity.Property(e => e.RoleID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.RoleName).HasMaxLength(50);
            });

            modelBuilder.Entity<V_WeChat_Platform>(entity =>
            {
                entity.HasNoKey();

                entity.ToView("V_WeChat_Platform");

                entity.Property(e => e.AppID).HasMaxLength(32);

                entity.Property(e => e.AppName).HasMaxLength(50);

                entity.Property(e => e.AppSecret).HasMaxLength(64);

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.EncodingAESKey).HasMaxLength(128);

                entity.Property(e => e.Logo).HasMaxLength(250);

                entity.Property(e => e.NotifyID)
                    .IsRequired()
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformName).HasMaxLength(50);

                entity.Property(e => e.SubscribeTemplateId).HasMaxLength(64);

                entity.Property(e => e.Token).HasMaxLength(64);

                entity.Property(e => e.TypeName).HasMaxLength(100);
            });

            modelBuilder.Entity<V_WeChat_PlatformNotify>(entity =>
            {
                entity.HasNoKey();

                entity.ToView("V_WeChat_PlatformNotify");

                entity.Property(e => e.Account)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.AppID).HasMaxLength(32);

                entity.Property(e => e.AppName).HasMaxLength(50);

                entity.Property(e => e.AppSecret).HasMaxLength(64);

                entity.Property(e => e.CompanyID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.EncodingAESKey).HasMaxLength(128);

                entity.Property(e => e.Logo).HasMaxLength(250);

                entity.Property(e => e.NotifyID)
                    .IsRequired()
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Password)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformName).HasMaxLength(50);

                entity.Property(e => e.SubscribeTemplateId).HasMaxLength(64);

                entity.Property(e => e.Token).HasMaxLength(64);

                entity.Property(e => e.TypeName).HasMaxLength(100);

                entity.Property(e => e.Uuid)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<V_WeChat_PlatformPayMerchant>(entity =>
            {
                entity.HasNoKey();

                entity.ToView("V_WeChat_PlatformPayMerchant");

                entity.Property(e => e.AppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.AppName).HasMaxLength(50);

                entity.Property(e => e.CertPath)
                    .HasMaxLength(256)
                    .IsUnicode(false);

                entity.Property(e => e.CompanyID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.Key)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Logo).HasMaxLength(250);

                entity.Property(e => e.MchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PayAppName).HasMaxLength(100);

                entity.Property(e => e.PayPlatformID)
                    .IsRequired()
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PayRemark).HasMaxLength(400);

                entity.Property(e => e.PayTypeName).HasMaxLength(100);

                entity.Property(e => e.PlatformID)
                    .IsRequired()
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.SubAppID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.SubMchID)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.TypeName).HasMaxLength(100);
            });

            modelBuilder.Entity<V_WeChat_User>(entity =>
            {
                entity.HasNoKey();

                entity.ToView("V_WeChat_User");

                entity.Property(e => e.AppName).HasMaxLength(50);

                entity.Property(e => e.City).HasMaxLength(100);

                entity.Property(e => e.CompanyID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Country).HasMaxLength(100);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.HeadImgUrl)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.Language)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Logo).HasMaxLength(250);

                entity.Property(e => e.MemberID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.NickName).HasMaxLength(100);

                entity.Property(e => e.OpenID)
                    .IsRequired()
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .IsRequired()
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformName).HasMaxLength(50);

                entity.Property(e => e.Privilege)
                    .HasMaxLength(2000)
                    .IsUnicode(false);

                entity.Property(e => e.Province).HasMaxLength(100);

                entity.Property(e => e.QRSceneStr).HasMaxLength(1000);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.SubscribeScene)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.TagIDList)
                    .HasMaxLength(1000)
                    .IsUnicode(false);

                entity.Property(e => e.TagNameList).HasMaxLength(2000);

                entity.Property(e => e.TypeName).HasMaxLength(100);

                entity.Property(e => e.UnionID)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<V_WeChat_UserBlacklist>(entity =>
            {
                entity.HasNoKey();

                entity.ToView("V_WeChat_UserBlacklist");

                entity.Property(e => e.City).HasMaxLength(100);

                entity.Property(e => e.CompanyID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Country).HasMaxLength(100);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.HeadImgUrl)
                    .HasMaxLength(250)
                    .IsUnicode(false);

                entity.Property(e => e.IpAddress)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.Language)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.NickName).HasMaxLength(100);

                entity.Property(e => e.OpenID)
                    .IsRequired()
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .IsRequired()
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Privilege)
                    .HasMaxLength(2000)
                    .IsUnicode(false);

                entity.Property(e => e.Province).HasMaxLength(100);

                entity.Property(e => e.QRSceneStr).HasMaxLength(1000);

                entity.Property(e => e.Remark).HasMaxLength(400);

                entity.Property(e => e.SubscribeScene)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.TagIDList)
                    .HasMaxLength(1000)
                    .IsUnicode(false);

                entity.Property(e => e.UnionID)
                    .HasMaxLength(32)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<V_WeChat_UserCodeMember>(entity =>
            {
                entity.HasNoKey();

                entity.ToView("V_WeChat_UserCodeMember");

                entity.Property(e => e.Code)
                    .IsRequired()
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.CompanyID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.IpAddress)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.MemberID)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.OpenID)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformID)
                    .IsRequired()
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.State)
                    .HasMaxLength(128)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<V_WeChat_UserTags>(entity =>
            {
                entity.HasNoKey();

                entity.ToView("V_WeChat_UserTags");

                entity.Property(e => e.AppName).HasMaxLength(50);

                entity.Property(e => e.CompanyID)
                    .IsRequired()
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.CreateDate).HasColumnType("datetime");

                entity.Property(e => e.IpAddress)
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.Logo).HasMaxLength(250);

                entity.Property(e => e.PlatformID)
                    .IsRequired()
                    .HasMaxLength(32)
                    .IsUnicode(false);

                entity.Property(e => e.PlatformName).HasMaxLength(50);

                entity.Property(e => e.TagName).HasMaxLength(32);

                entity.Property(e => e.TypeName).HasMaxLength(100);
            });

            OnModelCreatingPartial(modelBuilder);
        }

        partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
    }
}
